A set of tools, add-ons, and extension functions that enhance capabilities and streamline working with Kotlin Coroutines.
This library is usually required by other GFT libraries.
- launchUndispatched
fun CoroutineScope.launchUndispatched(
context: CoroutineContext = EmptyCoroutineContext,
block: suspend CoroutineScope.() -> Unit
): Job
- interruptable
suspend fun <T> interruptable(
block: () -> T
): T
- firstOf
suspend fun <T : Any?> firstOf(
action1: suspend () -> T,
action2: suspend () -> T,
vararg otherActions: suspend () -> T,
): T
- ErrorIgnoringScope
fun ErrorIgnoringScope(
dispatcher: CoroutineDispatcher = Dispatchers.Default
): CoroutineScope