waitForDone() is a very handy method, but for some reason it releases all the threads of the pool. Here is a simple scenario that requires a slightly different behavior:
1. a software renders a complex picture each frame (think of raytracing software)
2. it splits each frame to a set of chunks and renders them using QThreadPool
3. the software needs to wait for the rendering to finish before displaying a frame
4. the software needs to do the same for the next frame
QThreadPool fits perfect in this scenario, except for the 3rd clause, as there is no method to wait for the frame to be rendered without deleting all the threads that need to be re-created at the next frame, which takes time.
The code modification required are minimal and should not affect the old code if you keep the default behavior, but allow the caller to override it using additional parameter or a new method.