rd-framework / com.jetbrains.rd.framework.util / RdCoroutineScope

RdCoroutineScope

open class RdCoroutineScope

Constructors

<init>

RdCoroutineScope(lifetime: <ERROR CLASS>)

Properties

coroutineContext

val coroutineContext: <ERROR CLASS>

defaultDispatcher

open val defaultDispatcher: <ERROR CLASS>

Functions

async

fun <T> async(lifetime: <ERROR CLASS>, context: <ERROR CLASS> = EmptyCoroutineContext, start: <ERROR CLASS> = CoroutineStart.DEFAULT, action: suspend <ERROR CLASS>.() -> T): <ERROR CLASS><T>

launch

fun launch(lifetime: <ERROR CLASS>, context: <ERROR CLASS> = EmptyCoroutineContext, start: <ERROR CLASS> = CoroutineStart.DEFAULT, action: suspend <ERROR CLASS>.() -> Unit): <ERROR CLASS>

onException

open fun onException(throwable: Throwable): Unit

shutdown

open fun shutdown(): Unit

Companion Object Properties

current

val current: RdCoroutineScope

Companion Object Functions

override

fun override(lifetime: <ERROR CLASS>, host: RdCoroutineScope): Unit

Should be called on start of the application to override the default behavior of the Rd-based coroutines (default dispatcher, exception handler, shutdown behavior).

Extension Functions

deepClonePolymorphic

fun <T> T.deepClonePolymorphic(): T