Rewrite of the ThreadPool using condition variables. FUTURE: this could be speed-up by using futures. Description of the task and associated condition+mutex would go in an external struct. Note: the interface of the thread-pool itself is not thread-safe, you cannot give orders from multiple threads at once.
Launch a function in a newly created thread, which is destroyed afterwards. Return the thread so that you can call .join() on it.
Optimistic thread, failure not supported
Distributed under the Boost Software License 1.0. (See accompanying file LICENSE)
Copyright Sean Kelly 2005 - 2012. Copyright (c) 2009-2011, David Simcha. Copyright Auburn Sounds 2016.
Threads and thread-pool.