title: Is there a way to check if a NSLock was acquired?
body: <p>I am working on multithreaded code. Data access is locked in several sections via "NSLock" objects. I want to ensure that some methods which are called within these sections check if their appropriate lock was aquired.</p>
  
  <p>Something like:</p>
  
  <pre><code>assert([myLock isSet] == YES);
  </code></pre>
  
  <p>I can't find something like "isSet" in NSLock. Any ideas how to ensure a lock is set?</p>
  
  <p>Thanks!</p>