• 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: Background Process?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Background Process?
      • From: Kyle Sluder <email@hidden>
References: 
 >Background Process? (From: Pierce Freeman <email@hidden>)
 >Re: Background Process? (From: Daniel Richman <email@hidden>)
 >Re: Background Process? (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Background Process?
  • Next by Date: Fwd: Background Process?
  • Previous by thread: Re: Background Process?
  • Next by thread: Re: Background Process?
  • Index(es):
    • Date
    • Thread