On 24 Aug 2018, at 21:16, Alastair Houghton <alast...@alastairs-place.net> wrote: > > On 24 Aug 2018, at 20:01, Tor Arne Vestbø <tor.arne.ves...@qt.io> wrote: >> >> On 23 Aug 2018, at 12:06, Alastair Houghton <alast...@alastairs-place.net> >> wrote: >>> >>> Run loops are based on dispatch queues too, these days. >> >> Are they? We use CFRunLoop in the Qt event dispatchers on macOS and iOS, and >> I these behave as normal sources without any sign of dispatch queues as far >> as I can tell? >> >> I did experiment with using dispatch sources instead, but these can not be >> recursed, which was a showstopper unfortunately. I would have loved to use >> the queue debugging feature (backtrace recording) to tie posted Qt events >> back to their origin. > > You can see the code here > > https://opensource.apple.com/source/CF/CF-1153.18/CFRunLoop.c.auto.html > > Perhaps “based on dispatch queues” is an exaggeration; it’s more that they’re > very tightly integrated… CFRunLoop appears to be using dispatch queues for > timers, and there’s clearly integration such that dispatched calls will run > within the run loop. > > It does still have its own separate run loop sources, observers and so on, I > believe; they all talk to the run loop itself via a set of Mach ports.
Right, that matches my understanding. In a sense dispatch queues are based on runloops as well, so your description of “tightly integrated” is accurate 😊 Cheers, Tor Arne _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com