# alsoWithUnlockingOnSuccess

inline suspend fun alsoWithUnlockingOnSuccess (vararg lockers: SmartRWLocker , block: suspend () -> Unit ): Result < Unit >(source)

Executes the given block and unlocks all provided lockers for writing if the block succeeds. If the block throws an exception, the lockers will remain locked.

#### Return

A Result containing Unit on success or the exception that occurred

#### Parameters

lockers

Variable number of SmartRWLocker instances to unlock on successful execution

block

The suspending function to execute