Instance Method

tryLock()

Attempts to acquire a lock.

Declaration

func tryLock() -> Bool

Return Value

true if a lock was acquired, false otherwise.

Discussion

This method returns immediately after the attempt to acquire a lock.

See Also

Deprecated

func lock()

Attempts to acquire a lock on the context.

Deprecated
func unlock()

Relinquishes a previously acquired lock.

Deprecated