Re: Running a timer on a separate thread
Re: Running a timer on a separate thread
- Subject: Re: Running a timer on a separate thread
- From: Shawn Erickson <email@hidden>
- Date: Thu, 19 Feb 2009 16:40:14 -0800
On Thu, Feb 19, 2009 at 4:26 PM, Dave DeLong <email@hidden> wrote:
> Hi everyone,
>
> I'm sure the answer to this is out there, but I having difficulty finding
> it.
>
> We've got an app that splits off two threads: one to play some background
> music, and the other to count the beats that have passed so far. We're
> doing beat counting with a timer (we know the bpm of the music), but we've
> got a problem:
>
> We split off a thread to have the beat timer (so it doesn't interfere with
> interface responsiveness), but we can't figure out how to keep the thread
> alive and open so that the timer can fire. At first, the thread would die
> right after scheduling the timer on the thread's runloop.
Run the runloop in the secondary thread.
-Shawn
_______________________________________________
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