withAcquire

inline suspend fun <T> SmartSemaphore.Mutable.withAcquire(permits: Int = 1, action: () -> T): T(source)

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