Skip to content

Mutex.tryAcquire method

Mutex › tryAcquire

Takes the lock only if it is free right now.

Signature:

tryAcquire(): boolean

Returns: boolean — true if the lock was taken, which must then be released, false if it was held.