LimitedAccessWrapper

class LimitedAccessWrapper<T>(value: T)(source)

Protects access to the given value by wrapping it in this class and only exposing it via the access function, which will only be executed in a context where the internal Mutex is locked.

Constructors

Link copied to clipboard
constructor(value: T)

Functions

Link copied to clipboard
inline suspend fun <R> access(crossinline block: suspend (T) -> R): R