Package-level declarations

Types

Link copied to clipboard
expect class ReentrantLock

ReentrantLock from kotlinx.atomicfu.locks

actual class ReentrantLock

ReentrantLock from kotlinx.atomicfu.locks

ReentrantLock from kotlinx.atomicfu.locks

ReentrantLock from kotlinx.atomicfu.locks

Link copied to clipboard
expect open class SynchronizedObject

SynchronizedObject from kotlinx.atomicfu.locks

actual typealias SynchronizedObject = Any

SynchronizedObject from kotlinx.atomicfu.locks

actual typealias SynchronizedObject = Any

SynchronizedObject from kotlinx.atomicfu.locks

actual open class SynchronizedObject

SynchronizedObject from kotlinx.atomicfu.locks

Properties

Link copied to clipboard

Creates a new ReentrantLock instance.

Functions

Link copied to clipboard

Creates a new ReentrantLock instance.

actual inline fun reentrantLock(): ReentrantLock

Creates a new ReentrantLock instance.

Creates a new ReentrantLock instance.

Creates a new ReentrantLock instance.

Link copied to clipboard
expect inline fun <T> synchronized(lock: SynchronizedObject, block: () -> T): T

Executes the given block of code within a synchronized block, using the specified SynchronizedObject as the synchronization object. This function simplifies the process of creating synchronized blocks safely.

actual inline fun <T> synchronized(lock: SynchronizedObject, block: () -> T): T

Executes the given block of code within a synchronized block, using the specified SynchronizedObject as the synchronization object. This function simplifies the process of creating synchronized blocks safely.

Link copied to clipboard
expect inline fun <T> ReentrantLock.withLock(block: () -> T): T

Executes the given block of code while holding the specified ReentrantLock. This function simplifies the process of acquiring and releasing a lock safely.

actual inline fun <T> ReentrantLock.withLock(block: () -> T): T

Executes the given block of code while holding the specified ReentrantLock. This function simplifies the process of acquiring and releasing a lock safely.