title: Cocoa thread synchronisation when using [ALAssetsLibrary enumerateGroupsWithTypes:]
body: <p>I have recently, like a few people, discovered that <em>[ALAssetsLibrary enumerateGroupsWithTypes]</em> likes to run its blocks on another thread. What a shame that Apple didn't document that :-)</p>
  
  <p>In my current circumstance I need to wait for the enumeration to complete, before the main thread returns any results. I clearly need some sort of thread synchronisation.</p>
  
  <p>I've read about NSLock &amp; NSConditionLock, but nothing yet seems to fit the requirement of 'signal a blocked thread that this worker thread has completed'. It seems like a simple enough need - can anyone point me in the right direction?</p>
  
  <p>Your clue &amp; boos, are most welcome as always,</p>
  
  <p>M.</p>