[libdispatch-dev] libdispatch's thread model
sson at FreeBSD.org
Thu Jan 28 08:23:41 PST 2010
On Jan 27, 2010, at 9:32 PM, Mark Heily wrote:
> Mario Schwalbe wrote:
>> I know that Apple's non-posix extension to pthread isn't available.
>> Nevertheless, it should be possible to at least use a bounded number of
>> worker threads less than MAX_THREAD_COUNT (255). What about dynamically
>> setting MAX_THREAD_COUNT (or a similar variable) to the number of processors
> Stacy Son has kindly documented the pthread_workqueue(3) API which should be very helpful to get the correct semantics .
FYI, I didn't document all of apple's pthread_workqueue_*_np() functions but just the more interesting ones.
Also, my system call interface is very different from apple's and not documented but I wasn't trying to keep that compatible with their implementation.
You might find http://people.freebsd.org/~sson/thrworkq/pthread_workqueue.3.txt a bit easier to read.
More information about the libdispatch-dev