
Enhances coroutine capabilities with tools, add-ons, and extension functions, streamlining coroutine workflows and supporting other libraries. Features include `launchUndispatched`, `interruptable`, `firstOf`, and `ErrorIgnoringScope`.
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.
fun CoroutineScope.launchUndispatched(
context: CoroutineContext = EmptyCoroutineContext,
block: suspend CoroutineScope.() -> Unit
): Jobsuspend fun <T> interruptable(
block: () -> T
): Tsuspend fun <T : Any?> firstOf(
action1: suspend () -> T,
action2: suspend () -> T,
vararg otherActions: suspend () -> T,
): Tfun ErrorIgnoringScope(
dispatcher: CoroutineDispatcher = Dispatchers.Default
): CoroutineScopefun <T> flowFrom(
producer: suspend () -> T
): Flow<T>fun <T, R : Any?> Flow<T>.ignoreElements(): Flow<R>fun <T> Flow<T>.throttleLatest(
samplingRate: Duration
): Flow<T>fun <T> Flow<T>.toStateFlow(
initialValue: T,
scope: CoroutineScope,
updateValueOnGet: Boolean = false,
): StateFlow<T>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.
fun CoroutineScope.launchUndispatched(
context: CoroutineContext = EmptyCoroutineContext,
block: suspend CoroutineScope.() -> Unit
): Jobsuspend fun <T> interruptable(
block: () -> T
): Tsuspend fun <T : Any?> firstOf(
action1: suspend () -> T,
action2: suspend () -> T,
vararg otherActions: suspend () -> T,
): Tfun ErrorIgnoringScope(
dispatcher: CoroutineDispatcher = Dispatchers.Default
): CoroutineScopefun <T> flowFrom(
producer: suspend () -> T
): Flow<T>fun <T, R : Any?> Flow<T>.ignoreElements(): Flow<R>fun <T> Flow<T>.throttleLatest(
samplingRate: Duration
): Flow<T>fun <T> Flow<T>.toStateFlow(
initialValue: T,
scope: CoroutineScope,
updateValueOnGet: Boolean = false,
): StateFlow<T>