IOCoroutineScope

fun IOCoroutineScope(job: Job = SupervisorJob(), dispatcherProvider: DispatcherProvider = DefaultDispatcherProvider.get()): IOCoroutineScope

Factory function for an IOCoroutineScope with a DispatcherProvider. Dispatch defaults to the io property of the DispatcherProvider.

See also

kotlinx.coroutines.CoroutineScope

Parameters

job

Job to be used for the resulting CoroutineScope. Uses a SupervisorJob if one is not provided.

dispatcherProvider

DispatcherProvider to be used for the resulting CoroutineScope. Uses DefaultDispatcherProvider.get if one is not provided.


fun IOCoroutineScope(coroutineContext: CoroutineContext): IOCoroutineScope

Factory function for a IOCoroutineScope with a DispatcherProvider. Dispatch defaults to the io property of the DispatcherProvider.

See also

kotlinx.coroutines.CoroutineScope

Parameters

coroutineContext

CoroutineContext to be used for the resulting CoroutineScope. Any existing ContinuationInterceptor will be overwritten. If the CoroutineContext does not already contain a DispatcherProvider, DefaultDispatcherProvider.get will be added.