On Thursday 23 April 2015 21:18:11 Keane, Erich wrote: > Another alternative that I thought of based on Ashok's feedback is an > unlimited pool-thread system (essentially functionally like the glib > implementation, since the thread_count is greater than requested > threads), where the threads list is stored in an array list, then can be > joined at the end. I'm not sure what that buys us other than blocking > until all threads have been completed, but Ashok's comments seem to > believe that it is a necessity.
Please don't implement our own thread pool mechanism. From experience with doing QThreadPool, it's a nightmare to get right and fix all the race conditions associated with idle threads exiting. If you do need to implement a pool, then do not expire threads: let them run forever, once started. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center