Home
last modified time | relevance | path

Searched refs:CoroutineScope (Results 1 – 25 of 149) sorted by relevance

123456

/external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/
DCoroutineScope.kt64 public interface CoroutineScope { in <lambda>() interface
81 public operator fun CoroutineScope.plus(context: CoroutineContext): CoroutineScope = in plus()
104 public fun MainScope(): CoroutineScope = ContextScope(SupervisorJob() + Dispatchers.Main) in plus()
122 public val CoroutineScope.isActive: Boolean in plus()
146 public object GlobalScope : CoroutineScope { in plus()
188 public suspend fun <R> coroutineScope(block: suspend CoroutineScope.() -> R): R { in coroutineScope()
206 public fun CoroutineScope(context: CoroutineContext): CoroutineScope = in CoroutineScope() method
215 public fun CoroutineScope.cancel(cause: CancellationException? = null) { in CoroutineScope()
225 public fun CoroutineScope.cancel(message: String, cause: Throwable? = null): Unit = cancel(Cancella…
243 public fun CoroutineScope.ensureActive(): Unit = coroutineContext.ensureActive()
DBuilders.common.kt47 public fun CoroutineScope.launch( in <lambda>()
50 block: suspend CoroutineScope.() -> Unit in <lambda>()
82 public fun <T> CoroutineScope.async( in async()
85 block: suspend CoroutineScope.() -> T in async()
109 block: suspend CoroutineScope.() -> T in getCompleted()
139 block: suspend CoroutineScope.() -> T in withContext()
179 noinline block: suspend CoroutineScope.() -> T in invoke()
196 block: suspend CoroutineScope.() -> Unit
DTimeout.kt38 public suspend fun <T> withTimeout(timeMillis: Long, block: suspend CoroutineScope.() -> T): T { in <lambda>()
68 public suspend fun <T> withTimeout(timeout: Duration, block: suspend CoroutineScope.() -> T): T { in withTimeout()
96 public suspend fun <T> withTimeoutOrNull(timeMillis: Long, block: suspend CoroutineScope.() -> T): … in withTimeoutOrNull()
135 public suspend fun <T> withTimeoutOrNull(timeout: Duration, block: suspend CoroutineScope.() -> T):… in withTimeoutOrNull()
140 block: suspend CoroutineScope.() -> T in withTimeoutOrNull()
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/test/
DParentCancellationTest.kt21 CoroutineScope(coroutineContext + child).fail() in <lambda>()
29 CoroutineScope(coroutineContext + child).fail() in <lambda>()
37 CoroutineScope(coroutineContext + child).fail() in <lambda>()
97 private suspend fun CoroutineScope.testParentCancellation( in <lambda>()
102 child: suspend CoroutineScope.(block: suspend CoroutineScope.() -> Unit) -> Unit in <lambda>()
122 private suspend fun CoroutineScope.testWithException( in <lambda>()
128 child: suspend CoroutineScope.(block: suspend CoroutineScope.() -> Unit) -> Unit in <lambda>()
133 val scope = CoroutineScope(coroutineContext + parent) in <lambda>()
DUndispatchedResultTest.kt37 …private suspend fun invokeTest(scopeProvider: suspend (suspend CoroutineScope.() -> Unit) -> Unit)… in <lambda>()
44 scopeProvider: suspend (suspend CoroutineScope.() -> Unit) -> Unit in <lambda>()
54 private suspend fun CoroutineScope.block(context: CoroutineContext) { in <lambda>()
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/test/flow/terminal/
DLaunchFlow.kt11 public typealias Handler<T> = suspend CoroutineScope.(T) -> Unit in <lambda>()
30 public fun onEach(action: suspend CoroutineScope.(value: T) -> Unit) { in <lambda>()
37 …public inline fun <reified T : Throwable> catch(noinline action: suspend CoroutineScope.(T) -> Uni… in <lambda>()
44 public fun finally(action: suspend CoroutineScope.(cause: Throwable?) -> Unit) { in <lambda>()
63 private fun <T> CoroutineScope.launchFlow( in launchFlow()
90 handlers.finally?.invoke(CoroutineScope(coroutineContext + NonCancellable), caught) in launchFlow()
96 scope: CoroutineScope,
/external/kotlinx.coroutines/reactive/kotlinx-coroutines-rx2/src/
DRxCompletable.kt24 block: suspend CoroutineScope.() -> Unit in <lambda>()
37 public fun CoroutineScope.rxCompletable( in rxCompletable()
39 block: suspend CoroutineScope.() -> Unit in rxCompletable()
43 scope: CoroutineScope, // support for legacy rxCompletable in scope in rxCompletable()
45 block: suspend CoroutineScope.() -> Unit in rxCompletable()
DRxMaybe.kt25 block: suspend CoroutineScope.() -> T? in <lambda>()
38 public fun <T> CoroutineScope.rxMaybe( in rxMaybe()
40 block: suspend CoroutineScope.() -> T? in rxMaybe()
44 scope: CoroutineScope, // support for legacy rxMaybe in scope in rxMaybe()
46 block: suspend CoroutineScope.() -> T? in rxMaybe()
DRxSingle.kt24 block: suspend CoroutineScope.() -> T in <lambda>()
37 public fun <T : Any> CoroutineScope.rxSingle( in rxSingle()
39 block: suspend CoroutineScope.() -> T in rxSingle()
43 scope: CoroutineScope, // support for legacy rxSingle in scope in rxSingle()
45 block: suspend CoroutineScope.() -> T in rxSingle()
/external/kotlinx.coroutines/kotlinx-coroutines-debug/test/
DToStringTest.kt33 private suspend fun CoroutineScope.launchNestedScopes(): Job { in launchNestedScopes()
48 private fun CoroutineScope.launchDelayed(): Job { in launchDelayed() method
69 …assertEquals(expected, DebugProbes.scopeToString(CoroutineScope(job)).trimEnd().trimStackTrace().t… in <lambda>()
101 … private suspend fun CoroutineScope.checkHierarchy(isCompleting: Boolean, expectedString: String) { in checkHierarchy()
107 …assertEquals(expected, DebugProbes.scopeToString(CoroutineScope(root)).trimEnd().trimStackTrace().… in checkHierarchy()
113 private fun CoroutineScope.launchHierarchy(isCompleting: Boolean): Job { in CoroutineScope() method
DSanitizedProbesTest.kt106 private fun CoroutineScope.launchSelector(): Job { in launchSelector() method
119 private fun CoroutineScope.createActiveDeferred(): Deferred<*> = async { in <lambda>() method
128 private fun CoroutineScope.createDeferred(): Deferred<*> = createDeferredNested() in createDeferred() method
130 private fun CoroutineScope.createDeferredNested(): Deferred<*> = async(NonCancellable) { in createDeferred() method
DRunningThreadStackMergeTest.kt50 private fun CoroutineScope.launchCoroutine() { in CoroutineScope() method
98 private fun CoroutineScope.launchEscapingCoroutine() { in CoroutineScope() method
137 private fun CoroutineScope.launchEscapingCoroutineWithoutContext() { in CoroutineScope() method
DRecoveryExample.kt9 object PublicApiImplementation : CoroutineScope by CoroutineScope(CoroutineName("Example")) { in <lambda>()
/external/kotlinx.coroutines/reactive/kotlinx-coroutines-reactor/src/
DMono.kt28 block: suspend CoroutineScope.() -> T? in <lambda>()
41 public fun <T> CoroutineScope.mono( in mono()
43 block: suspend CoroutineScope.() -> T? in mono()
47 scope: CoroutineScope, // support for legacy mono in scope in mono()
49 block: suspend CoroutineScope.() -> T? in mono()
/external/kotlinx.coroutines/kotlinx-coroutines-test/test/
DTestCoroutineDispatcherTest.kt44 val scope = CoroutineScope(subject) in whenDispatcherPaused_doesntAutoProgressCurrent()
55 val scope = CoroutineScope(subject) in whenDispatcherResumed_doesAutoProgressCurrent()
67 val scope = CoroutineScope(subject) in whenDispatcherResumed_doesNotAutoProgressTime()
83 val scope = CoroutineScope(subject) in whenDispatcherPaused_thenResume_itDoesDispatchCurrent()
98 val scope = CoroutineScope(subject) in whenDispatcherHasUncompletedCoroutines_itThrowsErrorInCleanup()
DTestModuleHelpers.kt16 suspend fun CoroutineScope.assertRunsFast(block: suspend CoroutineScope.() -> Unit) { in assertRunsFast()
/external/kotlinx.coroutines/ui/kotlinx-coroutines-android/android-unit-tests/src/
DEmptyCoroutineScopeImpl.kt11 internal class EmptyCoroutineScopeImpl1 : CoroutineScope {
16 internal class EmptyCoroutineScopeImpl2 : CoroutineScope {
21 internal class EmptyCoroutineScopeImpl3 : CoroutineScope {
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/channels/
DProduce.kt17 public interface ProducerScope<in E> : CoroutineScope, SendChannel<E> { in <lambda>()
94 public fun <E> CoroutineScope.produce( in produce()
114 public fun <E> CoroutineScope.produce( in produce()
124 internal fun <E> CoroutineScope.produce( in produce()
/external/kotlinx.coroutines/reactive/kotlinx-coroutines-rx3/src/
DRxCompletable.kt21 block: suspend CoroutineScope.() -> Unit in <lambda>()
29 scope: CoroutineScope, // support for legacy rxCompletable in scope in rxCompletableInternal()
31 block: suspend CoroutineScope.() -> Unit in rxCompletableInternal()
DRxMaybe.kt22 block: suspend CoroutineScope.() -> T? in <lambda>()
30 scope: CoroutineScope, // support for legacy rxMaybe in scope in rxMaybeInternal()
32 block: suspend CoroutineScope.() -> T? in rxMaybeInternal()
DRxSingle.kt21 block: suspend CoroutineScope.() -> T in <lambda>()
29 scope: CoroutineScope, // support for legacy rxSingle in scope in rxSingleInternal()
31 block: suspend CoroutineScope.() -> T in rxSingleInternal()
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/flow/
DChannels.kt142 override fun broadcastImpl(scope: CoroutineScope, start: CoroutineStart): BroadcastChannel<T> { in receiveAsFlow()
147 override fun produceImpl(scope: CoroutineScope): ReceiveChannel<T> { in receiveAsFlow()
208 scope: CoroutineScope,
226 scope: CoroutineScope
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/flow/internal/
DFlowCoroutine.kt30 internal suspend fun <R> flowScope(@BuilderInference block: suspend CoroutineScope.() -> R): R = in <lambda>()
49 internal fun <R> scopedFlow(@BuilderInference block: suspend CoroutineScope.(FlowCollector<R>) -> U… in scopedFlow()
54 internal fun <T> CoroutineScope.flowProduce( in flowProduce()
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/flow/operators/
DShare.kt136 scope: CoroutineScope, in <lambda>()
194 private fun <T> CoroutineScope.launchSharing( in launchSharing()
300 scope: CoroutineScope, in stateIn()
317 public suspend fun <T> Flow<T>.stateIn(scope: CoroutineScope): StateFlow<T> { in stateIn()
324 private fun <T> CoroutineScope.launchSharingDeferred( in launchSharingDeferred()
/external/kotlinx.coroutines/reactive/kotlinx-coroutines-rx2/api/
Dkotlinx-coroutines-rx2.api25 …public static final fun rxCompletable (Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/Corou…
27 …public static synthetic fun rxCompletable$default (Lkotlinx/coroutines/CoroutineScope;Lkotlin/coro…
50 …public static final fun rxFlowable (Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/Coroutin…
52 …public static synthetic fun rxFlowable$default (Lkotlinx/coroutines/CoroutineScope;Lkotlin/corouti…
57 …public static final fun rxMaybe (Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/CoroutineCo…
59 …public static synthetic fun rxMaybe$default (Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines…
64 …public static final fun rxObservable (Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/Corout…
66 …public static synthetic fun rxObservable$default (Lkotlinx/coroutines/CoroutineScope;Lkotlin/corou…
75 …public static final fun rxSingle (Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/CoroutineC…
77 …public static synthetic fun rxSingle$default (Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutine…

123456