• 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: Andreas Falkenhahn <email@hidden>
  • Date: Mon, 22 Aug 2016 11:35:19 +0200

On 22.08.2016 at 01:54 Graham Cox wrote:

> Is it not possible to adapt this model to invoking [NSApp
> nextEventMatchingMask:untilDate:inMode:dequeue]?

Sure, it is, and I'm already using this right now. The problem in my
specific case, however, is that my application is a scripting language.
The user is not forced to write scripts using a waitEvent()-based
model (although he is encouraged to do so). The user may also choose
to poll and hog the CPU. That's up to the script.

> If your code is truly polling without sleeping, it’s going to be a
> horrible citizen in terms of battery life and CPU hogging. It might
> even be worse than the iOS Facebook app, which is hard to believe ;-)

See above, it's up to the individual script. It is possible to hog
the CPU, but I don't recommend it, obviously.

--
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


References: 
 >GetNumEventsInQueue() for Cocoa (From: Andreas Falkenhahn <email@hidden>)
 >Re: GetNumEventsInQueue() for Cocoa (From: David Duncan <email@hidden>)
 >Re: GetNumEventsInQueue() for Cocoa (From: Andreas Falkenhahn <email@hidden>)
 >Re: GetNumEventsInQueue() for Cocoa (From: Graham Cox <email@hidden>)

  • Prev by Date: Could not cast value of type 'Medication.Nurse' to 'MedicationTests.Nurse'
  • Next by Date: Re: NSResizableWindowMask for borderless windows
  • Previous by thread: Re: GetNumEventsInQueue() for Cocoa
  • Next by thread: uitabbar translucency and hiding
  • Index(es):
    • Date
    • Thread