• 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: NSTimer and NSLock
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >NSTimer and NSLock (From: Lorenzo <email@hidden>)

  • Prev by Date: Re: Trigonometric Problem, Particularly tan() Function
  • Next by Date: Re: Design Question: Where to observe using KVO?
  • Previous by thread: Re: NSTimer and NSLock
  • Next by thread: Remove overlap on NSBezierPath
  • Index(es):
    • Date
    • Thread