in reply to Re^2: using many threads and conserving stack size
in thread using many threads and conserving stack size
What that comes down to getting the parent to know when a thread has finished.
You could use Thread::Queue, and each thread can enqueue its id when it's finished. The parent could wait on that queue or poll it.
Or you could poll threads->list(threads::joinable) for threads you can polish off by joining. You might do that before creating a new thread, I suppose.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: using many threads and conserving stack size
by danmcb (Monk) on Nov 12, 2008 at 16:04 UTC | |
by gone2015 (Deacon) on Nov 12, 2008 at 16:26 UTC | |
by danmcb (Monk) on Nov 12, 2008 at 16:43 UTC | |
by gone2015 (Deacon) on Nov 12, 2008 at 17:08 UTC | |
by Zen (Deacon) on Nov 12, 2008 at 23:05 UTC |