Re: GetNumEventsInQueue() for Cocoa
Re: GetNumEventsInQueue() for Cocoa
- Subject: Re: GetNumEventsInQueue() for Cocoa
- From: David Duncan <email@hidden>
- Date: Sat, 20 Aug 2016 10:48:07 -0700
> On Aug 20, 2016, at 10:30 AM, Andreas Falkenhahn <email@hidden> wrote:
>
> Is there a Cocoa equivalent for the Carbon call
> GetNumEventsInQueue(GetMainEventQueue())?
>
> I use this a lot to poll whether there are events in the queue.
Why do you need to poll if there are events in the queue?
> I tried to use
>
> [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:nil inMode:NSDefaultRunLoopMode dequeue:NO]
>
> as a replacement but this is very, very slow in comparison to Carbon's
> GetNumEventsInQueue() API. I need something much faster. Any ideas?
>
> --
> Best regards,
> Andreas Falkenhahn mailto:email@hidden
>
> _______________________________________________
>
> 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
--
David Duncan
_______________________________________________
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