/external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/channels/ |
D | Channels.common.kt | 56 public suspend fun <E : Any> ReceiveChannel<E>.receiveOrNull(): E? { in receiveOrNull() 84 public suspend inline fun <E> BroadcastChannel<E>.consumeEach(action: (E) -> Unit): Unit = in consumeEach() 173 public suspend inline fun <E> ReceiveChannel<E>.consumeEach(action: (E) -> Unit): Unit = in consumeEach() 191 public suspend inline fun <E> ReceiveChannel<E>.consumeEachIndexed(action: (IndexedValue<E>) -> Uni… in consumeEachIndexed() 211 public suspend fun <E> ReceiveChannel<E>.elementAt(index: Int): E = in elementAt() 227 public suspend inline fun <E> ReceiveChannel<E>.elementAtOrElse(index: Int, defaultValue: (Int) -> … in elementAtOrElse() 252 public suspend fun <E> ReceiveChannel<E>.elementAtOrNull(index: Int): E? = in elementAtOrNull() 277 public suspend inline fun <E> ReceiveChannel<E>.find(predicate: (E) -> Boolean): E? = in find() 293 public suspend inline fun <E> ReceiveChannel<E>.findLast(predicate: (E) -> Boolean): E? = in find() 310 public suspend fun <E> ReceiveChannel<E>.first(): E = in find() [all …]
|
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/flow/terminal/ |
D | Collect.kt | 30 public suspend fun Flow<*>.collect(): Unit = collect(NopCollector) in collect() 71 public suspend inline fun <T> Flow<T>.collect(crossinline action: suspend (value: T) -> Unit): Unit… in collect() 73 override suspend fun emit(value: T) = action(value) in collect() 82 public suspend inline fun <T> Flow<T>.collectIndexed(crossinline action: suspend (index: Int, value… in collectIndexed() 85 override suspend fun emit(value: T) = action(checkIndexOverflow(index++), value) in collectIndexed() 109 public suspend fun <T> Flow<T>.collectLatest(action: suspend (value: T) -> Unit) { in collectLatest() 131 public suspend inline fun <T> FlowCollector<T>.emitAll(flow: Flow<T>): Unit = flow.collect(this)
|
D | Reduce.kt | 19 public suspend fun <S, T : S> Flow<T>.reduce(operation: suspend (accumulator: S, value: T) -> S): S… in <lambda>() 39 public suspend inline fun <T, R> Flow<T>.fold( in fold() 41 crossinline operation: suspend (acc: R, value: T) -> R in fold() 55 public suspend fun <T> Flow<T>.single(): T { in single() 70 public suspend fun <T> Flow<T>.singleOrNull(): T? { in singleOrNull() 90 public suspend fun <T> Flow<T>.first(): T { in first() 104 public suspend fun <T> Flow<T>.first(predicate: suspend (T) -> Boolean): T { in first() 122 public suspend fun <T> Flow<T>.firstOrNull(): T? { in firstOrNull() 135 public suspend fun <T> Flow<T>.firstOrNull(predicate: suspend (T) -> Boolean): T? { in firstOrNull()
|
/external/kotlinx.coroutines/benchmarks/src/jmh/kotlin/benchmarks/tailcall/ |
D | SimpleChannel.kt | 24 suspend fun send(element: Int) { in send() 43 suspend fun receive(): Int { in receive() 55 abstract suspend fun suspendReceive(): Int in suspendReceive() 56 abstract suspend fun suspendSend(element: Int) in suspendReceive() 60 override suspend fun suspendReceive(): Int = suspendCoroutineUninterceptedOrReturn { in suspendReceive() 65 override suspend fun suspendSend(element: Int) = suspendCoroutineUninterceptedOrReturn<Unit> { in suspendReceive() 73 override suspend fun suspendReceive(): Int = suspendCancellableCoroutine { in <lambda>() 78 override suspend fun suspendSend(element: Int) = suspendCancellableCoroutine<Unit> { in <lambda>() 87 override suspend fun suspendReceive(): Int = suspendCancellableCoroutineReusable { in <lambda>() 93 override suspend fun suspendSend(element: Int) = suspendCancellableCoroutineReusable<Unit> { in <lambda>()
|
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/flow/operators/ |
D | Zip.kt | 32 public fun <T1, T2, R> Flow<T1>.combine(flow: Flow<T2>, transform: suspend (a: T1, b: T2) -> R): Fl… in <lambda>() 51 public fun <T1, T2, R> combine(flow: Flow<T1>, flow2: Flow<T2>, transform: suspend (a: T1, b: T2) -… in combine() 74 @BuilderInference transform: suspend FlowCollector<R>.(a: T1, b: T2) -> Unit in combine() 102 @BuilderInference transform: suspend FlowCollector<R>.(a: T1, b: T2) -> Unit in combineTransform() 118 @BuilderInference transform: suspend (T1, T2, T3) -> R in combine() 137 @BuilderInference transform: suspend FlowCollector<R>.(T1, T2, T3) -> Unit in combineTransform() 155 transform: suspend (T1, T2, T3, T4) -> R in combine() 176 @BuilderInference transform: suspend FlowCollector<R>.(T1, T2, T3, T4) -> Unit in combineTransform() 196 transform: suspend (T1, T2, T3, T4, T5) -> R in combine() 219 @BuilderInference transform: suspend FlowCollector<R>.(T1, T2, T3, T4, T5) -> Unit in combineTransform() [all …]
|
D | Emitters.kt | 38 @BuilderInference crossinline transform: suspend FlowCollector<R>.(value: T) -> Unit in <lambda>() 49 @BuilderInference crossinline transform: suspend FlowCollector<R>.(value: T) -> Unit in unsafeTransform() 75 action: suspend FlowCollector<T>.() -> Unit in onStart() 145 action: suspend FlowCollector<T>.(cause: Throwable?) -> Unit in onCompletion() 180 action: suspend FlowCollector<T>.() -> Unit in onEmpty() 198 override suspend fun emit(value: Any?) { in emit() 203 private suspend fun <T> FlowCollector<T>.invokeSafely( in invokeSafely() 204 action: suspend FlowCollector<T>.(cause: Throwable?) -> Unit, in invokeSafely()
|
D | Limit.kt | 33 public fun <T> Flow<T>.dropWhile(predicate: suspend (T) -> Boolean): Flow<T> = flow { in <lambda>() 72 private suspend fun <T> FlowCollector<T>.emitAbort(value: T) { in emitAbort() 83 public fun <T> Flow<T>.takeWhile(predicate: suspend (T) -> Boolean): Flow<T> = flow { in <lambda>() 117 @BuilderInference transform: suspend FlowCollector<R>.(value: T) -> Boolean in transformWhile() 127 internal suspend inline fun <T> Flow<T>.collectWhile(crossinline predicate: suspend (value: T) -> B… in collectWhile() 129 override suspend fun emit(value: T) { in collectWhile()
|
D | Transform.kt | 20 public inline fun <T> Flow<T>.filter(crossinline predicate: suspend (T) -> Boolean): Flow<T> = tran… in <lambda>() 27 public inline fun <T> Flow<T>.filterNot(crossinline predicate: suspend (T) -> Boolean): Flow<T> = t… in filterNot() 47 public inline fun <T, R> Flow<T>.map(crossinline transform: suspend (value: T) -> R): Flow<R> = tra… in map() 54 public inline fun <T, R: Any> Flow<T>.mapNotNull(crossinline transform: suspend (value: T) -> R?): … in mapNotNull() 72 public fun <T> Flow<T>.onEach(action: suspend (T) -> Unit): Flow<T> = transform { value -> in onEach() 87 public fun <T, R> Flow<T>.scan(initial: R, @BuilderInference operation: suspend (accumulator: R, va… in <lambda>() 108 public fun <T> Flow<T>.runningReduce(operation: suspend (accumulator: T, value: T) -> T): Flow<T> =… in <lambda>()
|
/external/kotlinx.coroutines/reactive/kotlinx-coroutines-reactive/src/ |
D | Await.kt | 26 public suspend fun <T> Publisher<T>.awaitFirst(): T = awaitOne(Mode.FIRST) in <lambda>() 36 public suspend fun <T> Publisher<T>.awaitFirstOrDefault(default: T): T = awaitOne(Mode.FIRST_OR_DEF… in <lambda>() 46 public suspend fun <T> Publisher<T>.awaitFirstOrNull(): T? = awaitOne(Mode.FIRST_OR_DEFAULT) in <lambda>() 56 public suspend fun <T> Publisher<T>.awaitFirstOrElse(defaultValue: () -> T): T = awaitOne(Mode.FIRS… in <lambda>() 68 public suspend fun <T> Publisher<T>.awaitLast(): T = awaitOne(Mode.LAST) in <lambda>() 81 public suspend fun <T> Publisher<T>.awaitSingle(): T = awaitOne(Mode.SINGLE) in <lambda>() 94 public suspend fun <T> Publisher<T>.awaitSingleOrDefault(default: T): T = awaitOne(Mode.SINGLE_OR_D… in <lambda>() 107 public suspend fun <T> Publisher<T>.awaitSingleOrNull(): T = awaitOne(Mode.SINGLE_OR_DEFAULT) in <lambda>() 120 public suspend fun <T> Publisher<T>.awaitSingleOrElse(defaultValue: () -> T): T = awaitOne(Mode.SIN… in <lambda>() 133 private suspend fun <T> Publisher<T>.awaitOne( in awaitOne()
|
/external/kotlinx.coroutines/reactive/kotlinx-coroutines-rx2/src/ |
D | RxAwait.kt | 24 public suspend fun CompletableSource.await(): Unit = suspendCancellableCoroutine { cont -> in <lambda>() 44 public suspend fun <T> MaybeSource<T>.await(): T? = (this as MaybeSource<T?>).awaitOrDefault(null) in await() 55 public suspend fun <T> MaybeSource<T>.awaitOrDefault(default: T): T = suspendCancellableCoroutine {… in await() 74 public suspend fun <T> SingleSource<T>.await(): T = suspendCancellableCoroutine { cont -> in await() 94 public suspend fun <T> ObservableSource<T>.awaitFirst(): T = awaitOne(Mode.FIRST) in awaitFirst() 104 public suspend fun <T> ObservableSource<T>.awaitFirstOrDefault(default: T): T = awaitOne(Mode.FIRST… in awaitFirst() 114 public suspend fun <T> ObservableSource<T>.awaitFirstOrNull(): T? = awaitOne(Mode.FIRST_OR_DEFAULT) in awaitFirst() 124 public suspend fun <T> ObservableSource<T>.awaitFirstOrElse(defaultValue: () -> T): T = awaitOne(Mo… in awaitFirst() 136 public suspend fun <T> ObservableSource<T>.awaitLast(): T = awaitOne(Mode.LAST) in awaitFirst() 149 public suspend fun <T> ObservableSource<T>.awaitSingle(): T = awaitOne(Mode.SINGLE) in awaitFirst() [all …]
|
/external/kotlinx.coroutines/reactive/kotlinx-coroutines-rx3/src/ |
D | RxAwait.kt | 24 public suspend fun CompletableSource.await(): Unit = suspendCancellableCoroutine { cont -> in <lambda>() 44 public suspend fun <T> MaybeSource<T>.await(): T? = (this as MaybeSource<T?>).awaitOrDefault(null) in await() 55 public suspend fun <T> MaybeSource<T>.awaitOrDefault(default: T): T = suspendCancellableCoroutine {… in await() 74 public suspend fun <T> SingleSource<T>.await(): T = suspendCancellableCoroutine { cont -> in await() 94 public suspend fun <T> ObservableSource<T>.awaitFirst(): T = awaitOne(Mode.FIRST) in awaitFirst() 104 public suspend fun <T> ObservableSource<T>.awaitFirstOrDefault(default: T): T = awaitOne(Mode.FIRST… in awaitFirst() 114 public suspend fun <T> ObservableSource<T>.awaitFirstOrNull(): T? = awaitOne(Mode.FIRST_OR_DEFAULT) in awaitFirst() 124 public suspend fun <T> ObservableSource<T>.awaitFirstOrElse(defaultValue: () -> T): T = awaitOne(Mo… in awaitFirst() 136 public suspend fun <T> ObservableSource<T>.awaitLast(): T = awaitOne(Mode.LAST) in awaitFirst() 149 public suspend fun <T> ObservableSource<T>.awaitSingle(): T = awaitOne(Mode.SINGLE) in awaitFirst() [all …]
|
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/test/ |
D | UndispatchedResultTest.kt | 37 …private suspend fun invokeTest(scopeProvider: suspend (suspend CoroutineScope.() -> Unit) -> Unit)… in <lambda>() 42 private suspend fun invokeTest( in <lambda>() 44 scopeProvider: suspend (suspend CoroutineScope.() -> Unit) -> Unit in <lambda>() 54 private suspend fun CoroutineScope.block(context: CoroutineContext) { in <lambda>()
|
/external/llvm-project/llvm/test/Transforms/Coroutines/ |
D | no-suspend.ll | 1 ; Test no suspend coroutines 33 br i1 %need.dyn.free, label %dyn.free, label %suspend 36 br label %suspend 37 suspend: 43 ; replace suspend with a jump to %resume label turning it into no-suspend 74 %0 = call i8 @llvm.coro.suspend(token %save, i1 false) 75 switch i8 %0, label %suspend [i8 0, label %resume 88 br label %suspend 89 suspend: 95 ; replace suspend with a jump to %cleanup label turning it into no-suspend [all …]
|
D | coro-debug-frame-variable.ll | 89 br i1 %ready, label %init.ready, label %init.suspend 91 init.suspend: ; preds = %coro.init 94 %suspend = call i8 @llvm.coro.suspend(token %save, i1 false) 95 switch i8 %suspend, label %coro.ret [ 100 init.cleanup: ; preds = %init.suspend 103 init.ready: ; preds = %init.suspend, %coro.init 116 br i1 %ready.again, label %await.ready, label %await.suspend 118 await.suspend: ; preds = %init.ready 122 %suspend.again = call i8 @llvm.coro.suspend(token %save.again, i1 false) 123 switch i8 %suspend.again, label %coro.ret [ [all …]
|
D | coro-materialize.ll | 1 ; Verifies that we materialize instruction across suspend points 13 %sp1 = call i8 @llvm.coro.suspend(token none, i1 false) 14 switch i8 %sp1, label %suspend [i8 0, label %resume1 18 %sp2 = call i8 @llvm.coro.suspend(token none, i1 false) 19 switch i8 %sp1, label %suspend [i8 0, label %resume2 30 br label %suspend 31 suspend: 42 declare i8 @llvm.coro.suspend(token, i1)
|
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/ |
D | Timeout.kt | 38 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()
|
D | Builders.common.kt | 50 block: suspend CoroutineScope.() -> Unit in <lambda>() 85 block: suspend CoroutineScope.() -> T in async() 101 override suspend fun await(): T = awaitInternal() as T in getCompleted() 103 override fun <R> registerSelectClause1(select: SelectInstance<R>, block: suspend (T) -> R) = in getCompleted() 109 block: suspend CoroutineScope.() -> T in getCompleted() 137 public suspend fun <T> withContext( in withContext() 139 block: suspend CoroutineScope.() -> T in withContext() 178 public suspend inline operator fun <T> CoroutineDispatcher.invoke( in invoke() 179 noinline block: suspend CoroutineScope.() -> T in invoke() 196 block: suspend CoroutineScope.() -> Unit
|
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/flow/ |
D | Builders.kt | 56 public fun <T> flow(@BuilderInference block: suspend FlowCollector<T>.() -> Unit): Flow<T> = SafeFl… in <lambda>() 59 private class SafeFlow<T>(private val block: suspend FlowCollector<T>.() -> Unit) : AbstractFlow<T>… in <lambda>() 60 override suspend fun collectSafely(collector: FlowCollector<T>) { in <lambda>() 84 public fun <T> (suspend () -> T).asFlow(): Flow<T> = flow { in <lambda>() 147 override suspend fun collect(collector: FlowCollector<Nothing>) = Unit in emptyFlow() 265 public fun <T> channelFlow(@BuilderInference block: suspend ProducerScope<T>.() -> Unit): Flow<T> = in channelFlow() 331 public fun <T> callbackFlow(@BuilderInference block: suspend ProducerScope<T>.() -> Unit): Flow<T> … in channelFlow() 335 private val block: suspend ProducerScope<T>.() -> Unit, in channelFlow() 343 override suspend fun collectTo(scope: ProducerScope<T>) = in channelFlow() 351 private val block: suspend ProducerScope<T>.() -> Unit, [all …]
|
/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/test/exceptions/ |
D | StackTraceRecoveryWithTimeoutTest.kt | 25 private suspend fun outerWithTimeout() { in outerWithTimeout() 32 private suspend fun suspendForever() { in suspendForever() 46 private suspend fun outerChildWithTimeout() { in outerChildWithTimeout() 56 private suspend fun withTimeoutInChild() { in withTimeoutInChild() 72 private suspend fun outerChild() { in outerChild() 82 private suspend fun smallWithTimeout() { in smallWithTimeout()
|
D | StackTraceRecoveryTest.kt | 73 private suspend fun nestedMethod(deferred: Deferred<*>, vararg traces: String) { in <lambda>() 78 private suspend fun oneMoreNestedMethod(deferred: Deferred<*>, vararg traces: String) { in <lambda>() 108 private suspend fun outerMethod(deferred: Deferred<*>, vararg traces: String) { in <lambda>() 116 private suspend fun innerMethod(deferred: Deferred<*>, vararg traces: String) { in <lambda>() 174 …private suspend fun outerScopedMethod(deferred: Deferred<*>, vararg traces: String) = coroutineSco… in <lambda>() 202 private suspend fun throws() { in <lambda>() 207 private suspend fun awaiter() { in <lambda>() 215 val await = suspend { awaiter() } in <lambda>() 262 private suspend fun awaitCallback(channel: Channel<Callback>) { in <lambda>()
|
/external/kotlinx.coroutines/reactive/kotlinx-coroutines-jdk9/src/ |
D | Await.kt | 21 public suspend fun <T> Flow.Publisher<T>.awaitFirst(): T = FlowAdapters.toPublisher(this).awaitFirs… 31 public suspend fun <T> Flow.Publisher<T>.awaitFirstOrDefault(default: T): T = 42 public suspend fun <T> Flow.Publisher<T>.awaitFirstOrNull(): T? = 53 public suspend fun <T> Flow.Publisher<T>.awaitFirstOrElse(defaultValue: () -> T): T = 66 public suspend fun <T> Flow.Publisher<T>.awaitLast(): T = 80 public suspend fun <T> Flow.Publisher<T>.awaitSingle(): T =
|
/external/autotest/server/site_tests/bluetooth_AdapterSRHealth/ |
D | bluetooth_AdapterSRHealth.py | 113 suspend = self.suspend_async(suspend_time=SUSPEND_SEC) 118 self.test_suspend_and_wait_for_sleep(suspend, 121 suspend, 295 suspend = self.suspend_async(suspend_time=sleep_time, 307 self.test_suspend_and_wait_for_sleep(suspend, sleep_timeout=5) 322 suspend, 432 suspend = self.suspend_async(suspend_time=EXPECT_NO_WAKE_SUSPEND_SEC) 439 self.test_suspend_and_wait_for_sleep(suspend, 445 suspend, 455 suspend = self.suspend_async(suspend_time=EXPECT_NO_WAKE_SUSPEND_SEC) [all …]
|
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/flow/internal/ |
D | ChannelFlow.kt | 59 internal val collectToFun: suspend (ProducerScope<T>) -> Unit 108 protected abstract suspend fun collectTo(scope: ProducerScope<T>) in create() 133 override suspend fun collect(collector: FlowCollector<T>): Unit = in produceImpl() 158 protected abstract suspend fun flowCollect(collector: FlowCollector<T>) in flowCollect() 161 …private suspend fun collectWithContextUndispatched(collector: FlowCollector<T>, newContext: Corout… in flowCollect() 168 protected override suspend fun collectTo(scope: ProducerScope<T>) = in collectTo() 172 override suspend fun collect(collector: FlowCollector<T>) { in collectTo() 206 override suspend fun flowCollect(collector: FlowCollector<T>) = in toString() 224 …private val emitRef: suspend (T) -> Unit = { downstream.emit(it) } // allocate suspend function re… in <lambda>() 226 override suspend fun emit(value: T): Unit = in emit() [all …]
|
/external/kotlinx.coroutines/integration/kotlinx-coroutines-jdk8/src/time/ |
D | Time.kt | 18 public suspend fun delay(duration: Duration): Unit = delay(duration.coerceToMillis()) in delay() 35 public fun <R> SelectBuilder<R>.onTimeout(duration: Duration, block: suspend () -> R): Unit = in delay() 41 public suspend fun <T> withTimeout(duration: Duration, block: suspend CoroutineScope.() -> T): T { in delay() 51 public suspend fun <T> withTimeoutOrNull(duration: Duration, block: suspend CoroutineScope.() -> T)… in withTimeoutOrNull()
|
/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/test/channels/ |
D | ChannelSendReceiveStressTest.kt | 117 private suspend fun doSent() { in <lambda>() 125 private suspend fun doSend(senderIndex: Int) { in <lambda>() 132 private suspend fun doSendSelect(senderIndex: Int) { in <lambda>() 148 private suspend fun doReceive(receiverIndex: Int) { in <lambda>() 155 private suspend fun doReceiveOrNull(receiverIndex: Int) { in <lambda>() 161 private suspend fun doIterator(receiverIndex: Int) { in <lambda>() 167 private suspend fun doReceiveSelect(receiverIndex: Int) { in <lambda>() 176 private suspend fun doReceiveSelectOrNull(receiverIndex: Int) { in <lambda>()
|