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: Jerry Krinock <email@hidden>
- Date: Wed, 7 Nov 2007 15:54:19 -0800
On 2007 Nov, 07, at 7:01, Sudheer dantuluri wrote:
How can we know whether the NSConditionLock is locked or not? Can
anyone help me out in this issue.
I don't think there's a way to peek into whether or not a lock is
locked. Assuming that the reason you want to know is in order to know
whether or not to unlock it, here is what I have done...
Just lock it, using -lock or -tryLock, before unlocking it. I know
that seems kind of "wasteful", but I suspect that these methods are
just pushing a few BOOLs and are thus probably very cheap.
_______________________________________________
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