O*****d 发帖数: 762 | 1 Can anyone help me with it?
In my main thread I am creating multiple threads to support multiple clients,
but only the first child-thread created by the main thread runs, all the
other following threads just don't run at all, anyone knows why?
thank you :(
btw, i am working on a multi-client game server, faint | m*******m 发帖数: 182 | 2
How do you tell if they are not running?
【在 O*****d 的大作中提到】 : Can anyone help me with it? : In my main thread I am creating multiple threads to support multiple clients, : but only the first child-thread created by the main thread runs, all the : other following threads just don't run at all, anyone knows why? : thank you :( : btw, i am working on a multi-client game server, faint
| f*****e 发帖数: 2 | 3
I guess the reason is in some Unix platform thread is not
using round-robin scheduling policy by default, and your
first thread never block to give other thread a chance to
run. Try to set scheduling policy as round-robin if it's
not. Good luck!
【在 O*****d 的大作中提到】 : Can anyone help me with it? : In my main thread I am creating multiple threads to support multiple clients, : but only the first child-thread created by the main thread runs, all the : other following threads just don't run at all, anyone knows why? : thank you :( : btw, i am working on a multi-client game server, faint
|
|