• 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: detachDrawingThread:toTarget:withObject: vs detachNewThreadSelector:toTarget:withObject:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: detachDrawingThread:toTarget:withObject: vs detachNewThreadSelector:toTarget:withObject:


  • Subject: Re: detachDrawingThread:toTarget:withObject: vs detachNewThreadSelector:toTarget:withObject:
  • From: Chris Hanson <email@hidden>
  • Date: Wed, 27 Sep 2006 21:21:26 -0700

On Sep 27, 2006, at 3:56 AM, Antonio Nunes wrote:

The one place in my code where I know problems could occur I've made thread safe using @synchronize.

The above is either incorrect terminology or not doing what you think it is. All @synchronize does is declare a critical section linked to some object: a lock around a section of code such that only a single thread can be in *that section* of code *for that object* at the same time.


Thus whether or not the code in your @synchronized block is thread- safe depends a great deal on what the code actually does, and how it interacts with the rest of the code in your applciation.

  -- Chris

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: detachDrawingThread:toTarget:withObject: vs detachNewThreadSelector:toTarget:withObject:
      • From: Antonio Nunes <email@hidden>
References: 
 >detachDrawingThread:toTarget:withObject: vs detachNewThreadSelector:toTarget:withObject: (From: Antonio Nunes <email@hidden>)

  • Prev by Date: Re: Re: Using Sampler
  • Next by Date: Drag From iTunes in NSView just like iWeb did
  • Previous by thread: Re: detachDrawingThread:toTarget:withObject: vs detachNewThreadSelector:toTarget:withObject:
  • Next by thread: Re: detachDrawingThread:toTarget:withObject: vs detachNewThreadSelector:toTarget:withObject:
  • Index(es):
    • Date
    • Thread