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

Mark Heily mark at heily.com
Sun May 16 20:46:55 PDT 2010


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


More information about the libdispatch-dev mailing list