[libdispatch-dev] Using libdispatch/GCD in a real-time context

Stéphane Letz letz at grame.fr
Mon May 17 02:20:52 PDT 2010

Le 17 mai 2010 à 05:46, Mark Heily a écrit :

> On 05/12/2010 07:12 AM, Stéphane Letz wrote:
>> Right now there is no way to define a real-time queue in libdispatch,
>> but  would this kind of extension be theoreticaly possible? What would be the way
> to do that? Any comment on the overall idea?
> Hi,
> I think it would be possible to add realtime support to libdispatch, although you would also need changes to pthread_workqueue(3) libc functions.
> It sounds like you are using the Mach function thread_policy_set(), which is not portable and also not very general-purpose. Have you tried using pthread_setschedparam(3) with the SCHED_FIFO scheduling class, and would this approach be acceptable for JACK?
> Regards,
> - Mark

Using POSIX function is not enough. Real-time threads on OSX are "time constraints" threads (using the thread_policy_set API with THREAD_TIME_CONSTRAINT_POLICY)


What would be the different steps to follow to add realtime support to libdispatch then ?


Stephane Letz

More information about the libdispatch-dev mailing list