You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Returns the [CoroutineDispatcher] object related to current coroutine scope or throws [IllegalStateException] if the scope does not have one.
93
+
* Resulting [CoroutineDispatcher] is the dispatcher where all scope children are executed if they do not override dispatcher.
94
+
* E.g.
95
+
* ```
96
+
* scope.launch { ... } // Will be executed in scope.dispatcher (or Dispatchers.Default if scope does not have a dispatcher)
97
+
* scope.launch(Dispatchers.IO) { ... } // Will be executed in IO dispatcher, but still belongs to the scope
98
+
* ```
99
+
*/
100
+
publicvalCoroutineScope.dispatcher:CoroutineDispatcher get() = coroutineContext[ContinuationInterceptor] as?CoroutineDispatcher?: error("Scope $this does not have dispatcher in it")
101
+
102
+
/**
103
+
* Returns the [CoroutineDispatcher] object related to current coroutine scope or `null` if scope does not have one.
104
+
* See [CoroutineScope.dispatcher] for a more detailed explanation of scope dispatcher.
0 commit comments