• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: GetNumEventsInQueue() for Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: GetNumEventsInQueue() for Cocoa
      • From: Andreas Falkenhahn <email@hidden>
References: 
 >GetNumEventsInQueue() for Cocoa (From: Andreas Falkenhahn <email@hidden>)

  • Prev by Date: GetNumEventsInQueue() for Cocoa
  • Next by Date: Re: GetNumEventsInQueue() for Cocoa
  • Previous by thread: GetNumEventsInQueue() for Cocoa
  • Next by thread: Re: GetNumEventsInQueue() for Cocoa
  • Index(es):
    • Date
    • Thread