tryLock

expect fun tryLock(): Boolean

Attempts to acquire the lock. If the lock is available, it will be acquired, and this function will return true. If the lock is already held by another thread, this function will return false immediately without blocking.

Return

true if the lock was acquired, false otherwise.

actual inline fun tryLock(): Boolean