Re: GetNumEventsInQueue() for Cocoa
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