withWriteLock

inline suspend fun <T> SmartRWLocker.withWriteLock(action: () -> T): T(source)

Will call SmartMutex.Mutable.lock, then execute action and return the result after SmartMutex.Mutable.unlock