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:andr...@falkenhahn.com


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to