Re: NSTimer and NSLock
Re: NSTimer and NSLock
- Subject: Re: NSTimer and NSLock
- From: "Michael Ash" <email@hidden>
- Date: Sun, 13 Jul 2008 11:05:56 -0400
On Sun, Jul 13, 2008 at 6:13 AM, Lorenzo <email@hidden> wrote:
> Hi,
> I need to execute a method only after a thread has been executed.
> I guess I have to lock that thread but I don't know how.
> The thread I should lock comes from a timer
Timers have nothing to do with threads. All code in a timer executes
in the thread associated with the runloop that they are scheduled in;
in this case, this is most likely the main thread. As such, NSLock is
unnecessary, as you have no other thread.
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