Hi y'all!
I've been writing a game for a while, and I figured it'd be time to switch to multithreading, and maybe improve the overall FPS of the game.. However, in my long session of thought, I got stuck on one thing:
How do you "communicate", or pass information, between threads?
I know that if a variable is accessed by two threads at once, then the program crashes, and I've been told to use mutexes. But don't mutexes destroy the idea of speed? Don't they just make the program slower?
How do you guys work around this?
Cheers, and thanks in advance;
Aster
EDIT: Before I get told to post this stuff in the sf::System forum; I'm not having a problem with sf::Threads, this is more or less a general question.