doWithLock

fun <T> doWithLock(f: Supplier<T>): T(source)

Executes the given Supplier while holding the lock.