Home
last modified time | relevance | path

Searched refs:CoroutineDispatcher (Results 1 – 25 of 95) sorted by relevance

1234

/external/kotlinx.coroutines/kotlinx-coroutines-core/native/src/
DDispatchers.kt8 public actual val Default: CoroutineDispatcher = createDefaultDispatcher()
11 …public actual val Unconfined: CoroutineDispatcher get() = kotlinx.coroutines.Unconfined // Avoid f…
22 internal val IO: CoroutineDispatcher = DefaultIoScheduler
25 internal object DefaultIoScheduler : CoroutineDispatcher() {
30 override fun limitedParallelism(parallelism: Int, name: String?): CoroutineDispatcher { in limitedParallelism()
49 public actual val Dispatchers.IO: CoroutineDispatcher get() = IO
51 internal expect fun createMainDispatcher(default: CoroutineDispatcher): MainCoroutineDispatcher
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/
DCoroutineDispatcher.kt60 public abstract class CoroutineDispatcher : class
65 …c companion object Key : AbstractCoroutineContextKey<ContinuationInterceptor, CoroutineDispatcher>(
67 { it as? CoroutineDispatcher }) in <lambda>()
176 … public open fun limitedParallelism(parallelism: Int, name: String? = null): CoroutineDispatcher { in isDispatchNeeded()
186 …public open fun limitedParallelism(parallelism: Int): CoroutineDispatcher = limitedParallelism(par… in limitedParallelism()
263 public operator fun plus(other: CoroutineDispatcher): CoroutineDispatcher = other
DDispatchers.common.kt17 public val Default: CoroutineDispatcher
72 public val Unconfined: CoroutineDispatcher
DMainCoroutineDispatcher.kt11 public abstract class MainCoroutineDispatcher : CoroutineDispatcher() {
52 override fun limitedParallelism(parallelism: Int, name: String?): CoroutineDispatcher { in toString()
/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/test/
DDispatcherKeyTest.kt23 assertNull(context[CoroutineDispatcher]) in testDispatcher()
27 val result: CoroutineDispatcher? = updated[CoroutineDispatcher] in testDispatcher()
30 assertEquals(name, updated.minusKey(CoroutineDispatcher)) in testDispatcher()
43 assertSame(Dispatchers.Default, updated2[CoroutineDispatcher]) in testExecutorCoroutineDispatcher()
46 assertEquals(name, updated2.minusKey(CoroutineDispatcher)) in testExecutorCoroutineDispatcher()
DDispatchersToStringTest.kt32 …assertEquals("DefaultExecutor", (DefaultDelay as CoroutineDispatcher).limitedParallelism(42).toStr… in testLimitedParallelism()
36 …assertEquals("\uD80C\uDE11", (DefaultDelay as CoroutineDispatcher).limitedParallelism(42, "\uD80C\… in testLimitedParallelism()
37 …assertEquals("DefaultExecutor", (DefaultDelay as CoroutineDispatcher).limitedParallelism(42).toStr… in testLimitedParallelism()
47 val d = coroutineContext[CoroutineDispatcher]!! in testLimitedParallelism()
DFailingCoroutinesMachineryTest.kt17 class TestDispatcher(val name: String, val block: () -> CoroutineDispatcher) { in <lambda>()
18 private var _value: CoroutineDispatcher? = null in <lambda>()
20 val value: CoroutineDispatcher in <lambda>()
66 private object ThrowingDispatcher : CoroutineDispatcher() { in <lambda>()
74 private object ThrowingDispatcher2 : CoroutineDispatcher() { in <lambda>()
DExecutorsTest.kt49 val dispatcher: CoroutineDispatcher = executor.asCoroutineDispatcher() in <lambda>()
67 val dispatcher = object : CoroutineDispatcher() { in <lambda>()
84 val dispatcher = object : CoroutineDispatcher() { in <lambda>()
146 val dispatcher = object : CoroutineDispatcher() { in <lambda>()
173 val dispatcher = object : CoroutineDispatcher() { in <lambda>()
/external/kotlinx.coroutines/reactive/kotlinx-coroutines-rx3/test/
DSchedulerTest.kt185 val dispatcher = currentDispatcher() as CoroutineDispatcher in <lambda>()
240 val scheduler = (currentDispatcher() as CoroutineDispatcher).asScheduler() in <lambda>()
246 val scheduler = (currentDispatcher() as CoroutineDispatcher).asScheduler() in <lambda>()
264 val scheduler = (currentDispatcher() as CoroutineDispatcher).asScheduler() in <lambda>()
270 val scheduler = (currentDispatcher() as CoroutineDispatcher).asScheduler() in <lambda>()
276 val scheduler = (currentDispatcher() as CoroutineDispatcher).asScheduler() in <lambda>()
282 val scheduler = (currentDispatcher() as CoroutineDispatcher).asScheduler() in <lambda>()
299 val scheduler = (currentDispatcher() as CoroutineDispatcher).asScheduler() in <lambda>()
305 val scheduler = (currentDispatcher() as CoroutineDispatcher).asScheduler() in <lambda>()
311 val scheduler = (currentDispatcher() as CoroutineDispatcher).asScheduler() in <lambda>()
[all …]
DSchedulerStressTest.kt20 val dispatcher = currentDispatcher() as CoroutineDispatcher in <lambda>()
27 val dispatcher = currentDispatcher() as CoroutineDispatcher in <lambda>()
59 val dispatcher = currentDispatcher() as CoroutineDispatcher in <lambda>()
66 val dispatcher = currentDispatcher() as CoroutineDispatcher in <lambda>()
/external/kotlinx.coroutines/reactive/kotlinx-coroutines-rx2/test/
DSchedulerTest.kt185 val dispatcher = currentDispatcher() as CoroutineDispatcher in <lambda>()
240 val scheduler = (currentDispatcher() as CoroutineDispatcher).asScheduler() in <lambda>()
246 val scheduler = (currentDispatcher() as CoroutineDispatcher).asScheduler() in <lambda>()
264 val scheduler = (currentDispatcher() as CoroutineDispatcher).asScheduler() in <lambda>()
270 val scheduler = (currentDispatcher() as CoroutineDispatcher).asScheduler() in <lambda>()
276 val scheduler = (currentDispatcher() as CoroutineDispatcher).asScheduler() in <lambda>()
282 val scheduler = (currentDispatcher() as CoroutineDispatcher).asScheduler() in <lambda>()
299 val scheduler = (currentDispatcher() as CoroutineDispatcher).asScheduler() in <lambda>()
305 val scheduler = (currentDispatcher() as CoroutineDispatcher).asScheduler() in <lambda>()
311 val scheduler = (currentDispatcher() as CoroutineDispatcher).asScheduler() in <lambda>()
[all …]
DSchedulerStressTest.kt20 val dispatcher = currentDispatcher() as CoroutineDispatcher in <lambda>()
27 val dispatcher = currentDispatcher() as CoroutineDispatcher in <lambda>()
59 val dispatcher = currentDispatcher() as CoroutineDispatcher in <lambda>()
66 val dispatcher = currentDispatcher() as CoroutineDispatcher in <lambda>()
/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/src/
DExecutors.kt16 public abstract class ExecutorCoroutineDispatcher : CoroutineDispatcher(), Closeable, AutoCloseable…
19 …public companion object Key : AbstractCoroutineContextKey<CoroutineDispatcher, ExecutorCoroutineDi…
20 CoroutineDispatcher,
95 public fun Executor.asCoroutineDispatcher(): CoroutineDispatcher = in close()
103 public fun CoroutineDispatcher.asExecutor(): Executor = in close()
106 private class DispatcherExecutor(@JvmField val dispatcher: CoroutineDispatcher) : Executor { in close()
184 private val dispatcher: CoroutineDispatcher, in toString()
DDispatchers.kt17 public actual val Default: CoroutineDispatcher = DefaultScheduler
23 public actual val Unconfined: CoroutineDispatcher = kotlinx.coroutines.Unconfined
65 public val IO: CoroutineDispatcher get() = DefaultIoScheduler
103 public actual val Dispatchers.IO: CoroutineDispatcher get() = Dispatchers.IO
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/internal/
DLimitedDispatcher.kt23 private val dispatcher: CoroutineDispatcher, in <lambda>()
26 ) : CoroutineDispatcher(), Delay by (dispatcher as? Delay ?: DefaultDelay) { in <lambda>()
37 override fun limitedParallelism(parallelism: Int, name: String?): CoroutineDispatcher { in <lambda>()
132 internal fun CoroutineDispatcher.namedOrThis(name: String?): CoroutineDispatcher { in namedOrThis()
/external/kotlinx.coroutines/kotlinx-coroutines-core/jsAndWasmShared/src/
DDispatchers.kt5 internal expect fun createDefaultDispatcher(): CoroutineDispatcher in createDefaultDispatcher()
8 public actual val Default: CoroutineDispatcher = createDefaultDispatcher() in createDefaultDispatcher()
11 public actual val Unconfined: CoroutineDispatcher = kotlinx.coroutines.Unconfined in createDefaultDispatcher()
23 val delegate: CoroutineDispatcher,
/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/test/scheduling/
DSchedulerTestBase.kt61 protected val dispatcher: CoroutineDispatcher
78 protected fun blockingDispatcher(parallelism: Int): CoroutineDispatcher { in blockingDispatcher()
83 protected fun view(parallelism: Int): CoroutineDispatcher { in view()
104 internal fun SchedulerCoroutineDispatcher.blocking(parallelism: Int = 16): CoroutineDispatcher { in blocking()
105 return object : CoroutineDispatcher() { in blocking()
/external/kotlinx.coroutines/kotlinx-coroutines-core/nativeOther/src/
DDispatchers.kt6 internal actual fun createMainDispatcher(default: CoroutineDispatcher): MainCoroutineDispatcher = in createMainDispatcher()
9 internal actual fun createDefaultDispatcher(): CoroutineDispatcher = DefaultDispatcher in createMainDispatcher()
11 private object DefaultDispatcher : CoroutineDispatcher() { in createMainDispatcher()
/external/jetpack-camera-app/core/common/src/main/java/com/google/jetpackcamera/core/common/
DCommonModule.kt24 import kotlinx.coroutines.CoroutineDispatcher
37 fun provideDefaultDispatcher(): CoroutineDispatcher = Dispatchers.Default
41 fun provideIODispatcher(): CoroutineDispatcher = Dispatchers.IO
/external/kotlinx.coroutines/reactive/kotlinx-coroutines-rx2/src/
DRxScheduler.kt16 public fun Scheduler.asCoroutineDispatcher(): CoroutineDispatcher = in <lambda>()
31 public fun CoroutineDispatcher.asScheduler(): Scheduler = in asCoroutineDispatcher0()
38 private class DispatcherScheduler(@JvmField val dispatcher: CoroutineDispatcher) : Scheduler() {
67 private val dispatcher: CoroutineDispatcher,
149 ) : CoroutineDispatcher(), Delay {
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/test/
DImmediateYieldTest.kt24 private class ImmediateDispatcher(job: ContinuationInterceptor?) : CoroutineDispatcher() {
25 val delegate: CoroutineDispatcher = job as CoroutineDispatcher
/external/kotlinx.coroutines/reactive/kotlinx-coroutines-rx3/src/
DRxScheduler.kt16 public fun Scheduler.asCoroutineDispatcher(): CoroutineDispatcher = in <lambda>()
31 public fun CoroutineDispatcher.asScheduler(): Scheduler = in asCoroutineDispatcher0()
38 private class DispatcherScheduler(@JvmField val dispatcher: CoroutineDispatcher) : Scheduler() {
67 private val dispatcher: CoroutineDispatcher,
149 ) : CoroutineDispatcher(), Delay {
/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/src/scheduling/
DDispatcher.kt14 override fun limitedParallelism(parallelism: Int, name: String?): CoroutineDispatcher { in limitedParallelism()
36 private object UnlimitedIoScheduler : CoroutineDispatcher() { in toString()
47 override fun limitedParallelism(parallelism: Int, name: String?): CoroutineDispatcher { in toString()
76 override fun limitedParallelism(parallelism: Int, name: String?): CoroutineDispatcher { in execute()
/external/kotlinx.coroutines/kotlinx-coroutines-test/common/src/internal/
DTestMainDispatcher.kt12 internal class TestMainDispatcher(createInnerMain: () -> CoroutineDispatcher):
16 internal constructor(delegate: CoroutineDispatcher): this({ delegate }) in <lambda>()
19 private var delegate = NonConcurrentlyModifiable<CoroutineDispatcher?>(null, "Dispatchers.Main")
36 fun setDispatcher(dispatcher: CoroutineDispatcher) { in dispatch()
/external/kotlinx.coroutines/kotlinx-coroutines-core/concurrent/test/
DDefaultDispatchersConcurrencyTest.kt4 override val dispatcher: CoroutineDispatcher = Dispatchers.Default
8 override val dispatcher: CoroutineDispatcher = Dispatchers.IO

1234