27 Jan
2010
27 Jan
'10
3:41 p.m.
Hi, when dispatching a bunch of jobs (blocks) to a global concurrent queue, libdispatch, running on Linux or FreeBSD, always spawns a thread for each job submitted. On Mac OS X it works as expected. This somewhat interferes with libdispatch's initial intention of a set of worker threads - equal to the number of processors - that execute each job in turn. Is there some chance to get that fixed? 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 instead? ciao, Mario