Hi,
Robert was the one that asked me if I could look into this so hopefully he has not already done this... :)
Currently the GCD port for FreeBSD uses the user-level thread worker code in libdispatch and not the pthread_workqueue_*_np() calls like darwin. The pthread work queue code below pretty much follows the same idea that darwin uses. It is a kernel assisted thread pool implementation. The kernel manages the creation and destruction of threads in the work pool based on if it sees lots of the worker threads blocking, being idle for a (relatively) long time, etc. I don't know if it performs any better than the user-level thread pool since I have not yet done any performance testing.
Best Regards,
-stacey.
On Dec 15, 2009, at 1:26 PM, David Leimbach wrote:
I think Robert Watson has already done this?
My understanding is that 8-STABLE supports this.
Am I wrong?