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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software