SemaphoreProvider

interface SemaphoreProvider

Functions

Link copied to clipboard
abstract fun acquire(vararg key: String): Deferred<Unit>
abstract fun acquire(keys: List<String>): Deferred<Unit>
Link copied to clipboard
abstract fun release(vararg key: String): Deferred<Unit>
abstract fun release(keys: List<String>): Deferred<Unit>

Inheritors

Link copied to clipboard

Extensions

Link copied to clipboard
fun <T> SemaphoreProvider.withPermit(vararg address: String, coroutineContext: CoroutineContext = Dispatchers.Default, block: suspend () -> T): Deferred<T>
fun <T> SemaphoreProvider.withPermit(addresses: List<String>, coroutineContext: CoroutineContext = Dispatchers.Default, block: suspend () -> T): Deferred<T>