Package-level declarations

Types

Link copied to clipboard
interface BaseLock
Link copied to clipboard
expect class Lock : BaseLock

Reentrant typical lock.

actual class Lock : BaseLock
actual class Lock : BaseLock
actual class Lock : BaseLock
Link copied to clipboard
expect class NonRecursiveLock : BaseLock

Optimized lock that cannot be called inside another lock, don't keep the current thread id, or a list of threads to awake It is lightweight and just requires an atomic. Does busy-waiting instead of sleeping the thread.

actual class NonRecursiveLock : BaseLock
actual class NonRecursiveLock : BaseLock
actual class NonRecursiveLock : BaseLock

Functions

Link copied to clipboard
fun BaseLock.wait(time: TimeSpan, precise: Boolean): Boolean
Link copied to clipboard