I use scripts to update "player1" and "player2", but i need run it in threads and leave the SFML render in main thread.
I need launch one thread for each player without block main thread that will render everything.
Keep in mind when updating and rendering happen in different threads you might run into the problem, that not every entity is up to date with the same data while you draw it already. E.g. you move 100 players one pixel to the left while on the same time you draw them. The generated image might be that some of the players already moved that one pixel while others are still on the same position...
Apart from that you might run into race conditions and other nasty stuff, if you don't handle mulithreading correctly.
Btw the main thread doesn't get blocked as long as it has to do something, but in the posted example the main function reached it's end, thus it tried to destroy the sf::Thread objects, but since they were still running wait() is called in the destructor.