I have a loop starting with
[lock lock];
because in the body of the loop I create another thread that needs to be finished before the loop starts again. (Another thread unlocks it when done).
However, in the second loop, I get the following error:
2011-02-02 07:15:05.032 BLA[21915:a0f] *** -[NSLock lock]: deadlock (<NSLock: 0x100401f30> '(null)') 2011-02-02 07:15:05.032 BLA[21915:a0f] *** Break on _NSLockError() to debug.
The "lock" documentation states the following:
Annotation. An attempt to obtain a lock by blocking the execution of threads until a lock is received. (Required)
what makes me think that it just blocks until a lock is received?
cocoa nslock
Nippysaurus
source share