Re: -[NSConditionLock unlockWithCondition:]: lock (<NSConditionLock: 0x59f2050> '(null)') unlocked when not locked
Re: -[NSConditionLock unlockWithCondition:]: lock (<NSConditionLock: 0x59f2050> '(null)') unlocked when not locked
- Subject: Re: -[NSConditionLock unlockWithCondition:]: lock (<NSConditionLock: 0x59f2050> '(null)') unlocked when not locked
- From: "Clark Cox" <email@hidden>
- Date: Wed, 7 Nov 2007 16:05:08 -0800
On Nov 7, 2007 7:01 AM, Sudheer dantuluri <email@hidden> wrote:
> Hi All,
>
> I'm getting the following logs in the console, whenever my
> application is running on Leopard.
>
> -[NSConditionLock unlockWithCondition:]: lock (<NSConditionLock:
> 0x59f2050> '(null)') unlocked when not locked
>
> How can we know whether the NSConditionLock is locked or not? Can
> anyone help me out in this issue.
Generally, that's the wrong question to ask about locks. That is, if
there was an -isLocked method, who's to say that the lock wouldn't be
locked or unlocked on another thread before you can act upon (or even
see) the return value of the method?
You should know if a lock is locked, because you just locked it. And
if you didn't lock it, then you shouldn't be unlocking it.
--
Clark S. Cox III
email@hidden
_______________________________________________
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