-
public final class ThreadUtilsKt
-
-
Method Summary
Modifier and Type Method Description final static <T extends Any> TwithMainContext(SuspendFunction1<CoroutineScope, T> block)Switch to main thread context. final static <T extends Any> TwithIOContext(SuspendFunction1<CoroutineScope, T> block)Switch to I/O thread context. -
-
Method Detail
-
withMainContext
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP}) final static <T extends Any> T withMainContext(SuspendFunction1<CoroutineScope, T> block)
Switch to main thread context.
-
withIOContext
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP}) final static <T extends Any> T withIOContext(SuspendFunction1<CoroutineScope, T> block)
Switch to I/O thread context.
-
-
-
-