setCurrentBlocker

suspend fun setCurrentBlocker(blocker: Any?)

Sets the object to be returned by invocations of .getBlocker for the current thread. This method may be used before invoking the no-argument version of from non-public objects, allowing more helpful diagnostics, or retaining compatibility with previous implementations of blocking methods. Previous values of the blocker are not automatically restored after blocking. To obtain the effects of park(b}, use setCurrentBlocker(b); park(); setCurrentBlocker(null);

Since

14

Parameters

blocker

the blocker object