• 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: -[NSConditionLock unlockWithCondition:]: lock (<NSConditionLock: 0x59f2050> '(null)') unlocked when not locked
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >-[NSConditionLock unlockWithCondition:]: lock (<NSConditionLock: 0x59f2050> '(null)') unlocked when not locked (From: Sudheer dantuluri <email@hidden>)

  • Prev by Date: Re: NSLayoutManager and avoiding widows and orphans
  • Next by Date: Re: -[NSConditionLock unlockWithCondition:]: lock (<NSConditionLock: 0x59f2050> '(null)') unlocked when not locked
  • Previous by thread: -[NSConditionLock unlockWithCondition:]: lock (<NSConditionLock: 0x59f2050> '(null)') unlocked when not locked
  • Next by thread: Re: -[NSConditionLock unlockWithCondition:]: lock (<NSConditionLock: 0x59f2050> '(null)') unlocked when not locked
  • Index(es):
    • Date
    • Thread