Instance Method

tryLock

Attempts to acquire a lock and immediately returns a Boolean value that indicates whether the attempt was successful.

Declaration

- (BOOL)tryLock;

Return Value

YES if the lock was acquired, otherwise NO.

See Also

Acquiring a Lock

- lockBeforeDate:

Attempts to acquire a lock before a given time and returns a Boolean value indicating whether the attempt was successful.