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.
In reply to Re^3: using many threads and conserving stack size
by gone2015
in thread using many threads and conserving stack size
by danmcb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |