Blocks and atomically unlocks the receiver. This
method should only be called when the receiver is
locked. The caller will then block until the
receiver is sent either a
-signal
or -broadcast
message from another thread. At which point, the
calling thread will reacquire the lock.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Lock that allows user to request it only when an
internal integer condition is equal to a particular
value. The condition is set on initialization and
whenever the lock is relinquished.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Simplest lock for protecting critical sections of
code.
An NSLock is used in multi-threaded
applications to protect critical pieces of
code. While one thread holds a lock within a piece of
code, another thread cannot execute that code until
the first thread has given up its hold on the lock. The
limitation of NSLock is that you
can only lock an NSLock once and it must
be unlocked before it can be acquired again.
Other lock classes, notably
NSRecursiveLock
, have different restrictions.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Allows the lock to be recursively acquired by the same
thread. If the same thread locks the mutex (n) times
then that same thread must also unlock it (n) times
before another thread can acquire the lock.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Sets whether newly created lock objects (NSCondition,
NSConditionLock, NSLock, NSRecursiveLock
but NOT NSDistributedLock) should be created so that
their use by threads is traced and deadlocks can be
detected. Returns the old value of the
setting.