withLock

inline fun <T> Lock.withLock(action: () -> T): T(source)

Executes the given action under this lock.

Since Kotlin

1.0

Return

the return value of the action.