[Mono-dev] [PATCH] Threadpool changes + performance counters
Gonzalo Paniagua Javier
gonzalo.mono at gmail.com
Thu Sep 24 17:13:18 EDT 2009
Attached is a patch that does a few changes to the threadpool:
-There is a list of idle threads
-Each of those idle threads wait on their own WaitHandle instead
of all of them using the same semaphore. When a new work item is
added, the job is assigned directly to an idle thread or a newly
created one if possible and then the handle for that thread is
signaled. Compare that to the current approach where all the
threads in the pool compete to dequeue a job from the same
-New struct ThreadPool that brings together the bunch of static
variable for each threadpool (IO and regular).
-New performance counters: # of items added and its rate per
threadpool. The rate will be used later, perhaps together with
other perf. counters, to decide when idle threads should exit.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 37457 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090924/a832bb01/attachment-0001.bin
More information about the Mono-devel-list