Re: Asynchronous timers (without a run loop)
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