[threads] thread_group::create_thread() locks?

Hi, My program uses a thread group for handling threads. these are joined, when the program ist killed, which should happen not so often, because its used to be a daemon. Most time it works just as expected. but sometimes after running the program for some minutes and after creating a bunch of threads the function thread_group::create_thread() locks. Is this possible? i think it shoulnt lokc, but it does. Im sorry, i cannot show you code cause its closed source and its a liddle bit too big and also works most of the time. I hope a answer to this question will allready help fixing. Thanks for reading. Cheers Manuel Jung

Manuel Jung wrote:
My program uses a thread group for handling threads. these are joined, when the program ist killed,
What exactly do you mean by "killed"? How do you tell a thread that it should end?
which should happen not so often, because its used to be a daemon. Most time it works just as expected. but sometimes after running the program for some minutes and after creating a bunch of threads the function thread_group::create_thread() locks.
What do you mean by "it works as expected" ? What exactly happens in which order? Starting the program & Creating the threads then running for some minutes? or Starting the program then waiting then creating some threads? or Starting & creating then waiting the stopping (the threads) later creating another set of threads ? ....
Is this possible? i think it shoulnt lokc, but it does.
Why do you think it shouldn't?
Im sorry, i cannot show you code cause its closed source and its a liddle bit too big and also works most of the time.
Usually you will get better help if you try to strip down your code, until you find a small enough example that has the same behaviour than yours. Even if you would post your code I suspect you wouldn't found many here which will help to debug it for free under these circumstances.
I hope a answer to this question will allready help fixing.
Please try again to restate your question. And please also specify some of the more common things too: Used boost version, platform, compiler, .... Thank you, Roland
participants (2)
-
Manuel Jung
-
Roland Schwarz