• 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: Asynchronous timers (without a run loop)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Asynchronous timers (without a run loop)


  • Subject: Re: Asynchronous timers (without a run loop)
  • From: "Michael Ash" <email@hidden>
  • Date: Thu, 4 Dec 2008 12:19:14 -0500

On Thu, Dec 4, 2008 at 8:00 AM, Påhl Melin <email@hidden> wrote:
> Yes, I could set up a new thread, handling a list of usleep()
> intervals between the actual timer events but it would be very hard to
> make a reliable, drift-free timer service, handling lots of timer
> events and it would take quite some time to develop a fully functional
> and reliable version. I really hope I don't have to...

You know, if you set up a new thread, then run an NSRunLoop on it and
schedule timers on that, then you will get a reliable, drift-free
timer service, handling lots of timer events, fully functional and
reliable, with approximately zero work on your part.

If you can use a separate thread, you can use a runloop. I don't see
why you're trying to avoid them, perhaps you're unaware of this fact?

Mike
_______________________________________________

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: 
 >Asynchronous timers (without a run loop) (From: "Påhl Melin" <email@hidden>)
 >Re: Asynchronous timers (without a run loop) (From: Nathan Day <email@hidden>)
 >Re: Asynchronous timers (without a run loop) (From: "Påhl Melin" <email@hidden>)

  • Prev by Date: Re: NSTimer
  • Next by Date: Re: Help Menu <Please>
  • Previous by thread: Re: Asynchronous timers (without a run loop)
  • Next by thread: Re: Asynchronous timers (without a run loop)
  • Index(es):
    • Date
    • Thread