withLock

inline suspend fun <T> SmartMutex.Mutable.withLock(action: () -> T): T(source)

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