We use the Poco's HTTP server. We need to start server inside our application on demand, later we stop it by some event. We also required to continue application execution after stopping the server only when all threads used by the server are actually finished (in other words the Thread::join() are required for all pool's threads).
But unfortunately the Poco's ThreadPool doesn't provide the method to join() ("real" join()) to all its threads after stopping pool working.
The ThreadPool::joinAll() actually just wait for completion of all tasks executed by the pool's threads but not the completion of the threads.
The ThreadPool::stopAll() actually lead to the finishing of all threads, but it not join() to these threads ! After stopAll() returns the pool's threads can be still executed (going to stopping).
We propose to add ability to join to all pool's threads when pool is no longer used and going to be destroyed. It can be bool parameter of the stopAll(bool joinToAll) which indicate whether stopAll() need to join to all threads (new behavior) or just turn the threads to going stopping and exit (old behavior).
Sorry for bad English !
Best regards, Alexey Kryshen