alsoWithUnlockingOnSuccessAsync

fun alsoWithUnlockingOnSuccessAsync(scope: CoroutineScope, vararg lockers: SmartRWLocker, block: suspend () -> Unit): Job(source)

Asynchronously executes the given block and unlocks all provided lockers for writing if the block succeeds. This function launches a new coroutine in the given scope and automatically logs and drops any exceptions.

Return

A Job representing the launched coroutine

Parameters

scope

The CoroutineScope in which to launch the coroutine

lockers

Variable number of SmartRWLocker instances to unlock on successful execution

block

The suspending function to execute