use

inline fun <R> use(block: () -> R): R

Conditionally synchronizes around the lock object, only if the lock object is not null. Majority of the time, the lock will be null, which means no synchronization takes place.