runExclusively

fun runExclusively(work: suspend () -> Unit)

While the supplied work is running, this lock is considered taken and all other invocations of this method will just return, doing nothing.