Re: Background Process?
Re: Background Process?
- Subject: Re: Background Process?
- From: Roland King <email@hidden>
- Date: Wed, 11 Mar 2009 09:49:16 +0800
This is a bad idea. It will put unnecessary burden on the processor,
and therefore reduce battery life on mobile machines, by doing nothing
in the runloop until the timer fires. It's just not an appropriate
use of the NSTimer functionality.
launchd already has the capability of launching tasks on a schedule
using the StartCalendarInterval plist key. Just use it.
--Kyle Sluder
Could you expand on that a bit please? My mental picture of the runloop
has always been more like a select() which does nothing unless there is
something to do. Not that I ever quite sorted out in my own mind how an
NSTimer fits is something you can select() on. Does the runloop actually
poll a whole lot even when it has nothing to do?
_______________________________________________
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