Re: Synchronizing Thread Execution
Re: Synchronizing Thread Execution
- Subject: Re: Synchronizing Thread Execution
- From: Buddy Kurz <email@hidden>
- Date: Tue, 5 Dec 2006 08:08:17 -0800
FYI: The Darwin source contains a comment that specifically says
@synchronized(nil) does nothing.
I'm wondering what the difference is between
@synchronized(myObject) {
//do stuff
}
and
{
[myLock lock];
//do stuff
[myLock unlock];
}
On Dec 5, 2006, at 6:20 AM, Scott Ribe wrote:
@synchronized does not interact with the object
in any way, doesn't send it any messages, at least as far as I know,
so why would it have to be initialized?
You may be right about that, but nil is still not a good idea...
--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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