Re: Carbon -> Cocoa
Re: Carbon -> Cocoa
- Subject: Re: Carbon -> Cocoa
- From: Tor Arne Vestbø <email@hidden>
- Date: Fri, 24 Aug 2018 19:26:12 +0000
- Thread-topic: Carbon -> Cocoa
On 24 Aug 2018, at 21:16, Alastair Houghton <email@hidden>
wrote:
>
> On 24 Aug 2018, at 20:01, Tor Arne Vestbø <email@hidden> wrote:
>>
>> On 23 Aug 2018, at 12:06, Alastair Houghton <email@hidden>
>> 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 (email@hidden)
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:
This email sent to email@hidden