SFML community forums
Help => System => Topic started by: Neomex on December 30, 2011, 07:08:13 pm
-
How many threads can single application handle?
Is there some limit, might they slow program down?
-
The limit depends on the OS. But if you ask this question, it means that you're doing something wrong: the more threads you spawn, the slower your program becomes. You should have only a few threads, and only if they are really necessary (beginners tend to overuse them).
-
Didn't implemented any yet, but considered to use them in few places like loading files and displaying graphics at the same time. Also, do clocks use different threads for measuring time?
-
displaying graphics at the same time
Don't create multiple rendering threads, it won't work.
Also, do clocks use different threads for measuring time?
No.
-
Don't create multiple rendering threads, it won't work.
I believe the intent here is to load resources while displaying a progress bar or something.
-
For Windows, see also this MSDN post:
http://blogs.msdn.com/b/oldnewthing/archive/2005/07/29/444912.aspx
But the real question that is raised whenever somebody asks, "What's the maximum number of threads that a process can create?" is "Why are you creating so many threads that this even becomes an issue?"