[libdispatch-dev] libpthread_workqueue released
mark at heily.com
Tue Aug 3 18:57:31 PDT 2010
On 08/02/2010 09:17 AM, Chen Jie wrote:
> Hi mark,
> I've read some code snippets of libpthread_workqueue 0.1. It doesn't
> implement the over-commit feature, am I right?
Not yet. It also doesn't implement priority levels, and the algorithm for
managing the size of the thread pool is very simplistic.
> Does over-commit means when some threads in thread pool are blocked, a
> new thread will be created even thread pool is full? When the blocked
> threads are waken, the total number of active threads will exceed the
> size of thread pool?
That sounds like the general idea, yes. The size of the thread pool is
dynamic, and will be determined by the overall load on the system, so having
"too many threads" is okay. As soon as the load exceeds the capacity of the
system, the number of threads will be automatically reduced.
More information about the libdispatch-dev