Home
last modified time | relevance | path

Searched refs:trySend (Results 1 – 25 of 59) sorted by relevance

123

/external/kotlinx.coroutines/kotlinx-coroutines-core/common/test/channels/
DChannelBufferOverflowTest.kt14 assertTrue(c.trySend(1).isSuccess) in <lambda>()
15 assertTrue(c.trySend(2).isSuccess) in <lambda>()
16 assertTrue(c.trySend(3).isSuccess) // overflows, dropped in <lambda>()
19 assertTrue(c.trySend(5).isSuccess) in <lambda>()
20 assertTrue(c.trySend(6).isSuccess) // overflows, dropped in <lambda>()
29 assertTrue(c.trySend(1).isSuccess) in <lambda>()
30 assertTrue(c.trySend(2).isSuccess) in <lambda>()
31 assertTrue(c.trySend(3).isSuccess) // overflows, keeps 2, 3 in <lambda>()
34 assertTrue(c.trySend(5).isSuccess) in <lambda>()
35 assertTrue(c.trySend(6).isSuccess) // overflows, keeps 5, 6 in <lambda>()
DBufferedChannelTest.kt94 assertTrue(q.trySend(1).isSuccess) in <lambda>()
112 assertTrue(q.trySend(2).isSuccess) in <lambda>()
114 assertTrue(q.trySend(3).isSuccess) in <lambda>()
116 assertFalse(q.trySend(4).isSuccess) in <lambda>()
165 channel.trySend(-1) in <lambda>()
DConflatedChannelTest.kt18 assertTrue(q.trySend(1).isSuccess) in createConflatedChannel()
19 assertTrue(q.trySend(2).isSuccess) in createConflatedChannel()
20 assertTrue(q.trySend(3).isSuccess) in createConflatedChannel()
DChannelUndeliveredElementTest.kt160 channel.trySend(4).onFailure { expectUnreached() } in <lambda>()
171 conflated.trySend(3) in <lambda>()
181 conflated.trySend(3) in <lambda>()
197 channel.trySend(3) in <lambda>()
DBasicOperationsTest.kt47 channel.trySend(42) in <lambda>()
163 channel.trySend(2) in <lambda>()
179 channel.trySend(42) in <lambda>()
181 channel.trySend(1) in <lambda>()
DRendezvousChannelTest.kt85 assertFalse(q.trySend(1).isSuccess) in <lambda>()
102 assertTrue(q.trySend(2).isSuccess) in <lambda>()
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/test/flow/channels/
DChannelFlowTest.kt15 assertTrue(trySend(1).isSuccess) in <lambda>()
16 assertTrue(trySend(2).isSuccess) in <lambda>()
17 assertTrue(trySend(3).isSuccess) in <lambda>()
25 assertTrue(trySend(1).isSuccess) in <lambda>()
26 assertTrue(trySend(2).isSuccess) in <lambda>()
27 assertFalse(trySend(3).isSuccess) in <lambda>()
35 assertTrue(trySend(1).isSuccess) in <lambda>()
36 assertTrue(trySend(2).isSuccess) in <lambda>()
37 assertTrue(trySend(3).isSuccess) in <lambda>()
38 assertTrue(trySend(4).isSuccess) in <lambda>()
[all …]
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/channels/
DBroadcastChannel.kt112 trySend(value)
181 s.trySend(value) in <lambda>()
237 override fun trySend(element: E): ChannelResult<Unit> = lock.withLock { // protected by lock in <lambda>() method in kotlinx.coroutines.channels.BroadcastChannelImpl
239 if (isClosedForSend) return super.trySend(element) in <lambda>()
251 subscribers.forEach { it.trySend(element) } in <lambda>()
DConflatedBufferedChannel.kt57 override fun trySend(element: E): ChannelResult<Unit> = trySendImpl(element, isSendOp = false) in <lambda>() method
65 val result = super.trySend(element) in <lambda>()
105 trySend(element as E).let { in <lambda>()
/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/test/lincheck/
DChannelsLincheckTest.kt72 override fun trySend(value: Int) = super.trySend(value) in <lambda>() method
111 open fun trySend(@Param(name = "value") value: Int): Any = c.trySend(value) in trySend() method in ChannelLincheckTestBase
184 suspend fun send(x: Int): Any = when (val offerRes = trySend(x)) { in offerRes()
192 fun trySend(element: Int): Any { in trySend() method in SequentialIntChannelBase
/external/kotlinx.coroutines/kotlinx-coroutines-core/concurrent/src/channels/
DChannels.kt37 trySend(element).onSuccess { return ChannelResult.success(Unit) } in trySendBlocking()
54 if (trySend(element).isSuccess) in sendBlocking()
/external/kotlinx.coroutines/reactive/kotlinx-coroutines-rx3/src/
DRxChannel.kt75 trySend(t)
80 trySend(t) // Safe to ignore return value here, expectedly racing with cancellation
/external/kotlinx.coroutines/kotlinx-coroutines-core/concurrent/test/channels/
DConflatedBroadcastChannelNotifyStressTest.kt31 broadcast.trySend(i) in <lambda>()
65 broadcast.trySend(nEvents) // last event to signal receivers termination in <lambda>()
/external/kotlinx.coroutines/reactive/kotlinx-coroutines-rx2/src/
DRxChannel.kt63 trySend(t)
68 trySend(t) // Safe to ignore return value here, expectedly racing with cancellation
/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/test/flow/
DCallbackFlowTest.kt39 it.trySend(++i) in <lambda>()
80 it.trySend(++i) in <lambda>()
/external/kotlinx.coroutines/reactive/kotlinx-coroutines-jdk9/test/
DPublishTest.kt222 val result: ChannelResult<Unit> = producerScope!!.trySend(1) in <lambda>()
270 val result = producerScope!!.trySend(1) in <lambda>()
280 assertFailsWith<NullPointerException> { trySend(null) } in <lambda>()
/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/src/channels/
DActor.kt176 override fun trySend(element: E): ChannelResult<Unit> { in trySend() method
178 return super.trySend(element) in trySend()
/external/kotlinx.coroutines/reactive/kotlinx-coroutines-reactive/test/
DPublishTest.kt226 val result: ChannelResult<Unit> = producerScope!!.trySend(1) in <lambda>()
274 val result = producerScope!!.trySend(1) in <lambda>()
284 assertFailsWith<NullPointerException> { trySend(null) } in <lambda>()
/external/kotlinx.coroutines/reactive/kotlinx-coroutines-reactor/test/
DFluxTest.kt162 val result = producerScope!!.trySend(1) in <lambda>()
172 assertFailsWith<NullPointerException> { trySend(null) } in <lambda>()
/external/kotlinx.coroutines/kotlinx-coroutines-core/native/src/
DMultithreadedDispatchers.kt112 val result = availableWorkers.trySend(it) in isClosed()
139 val result = tasksQueue.trySend(block) in dispatch()
/external/kotlinx.coroutines/kotlinx-coroutines-test/common/src/
DTestCoroutineScheduler.kt203 dispatchEvents.trySend(Unit) in sendDispatchEvent()
205 dispatchEventsForeground.trySend(Unit) in sendDispatchEvent()
/external/kotlinx.coroutines/ui/kotlinx-coroutines-javafx/src/
DJavaFxConvert.kt33 trySend(newValue) in <lambda>()
/external/kotlinx.coroutines/reactive/kotlinx-coroutines-rx2/test/
DObservableSourceAsFlowStressTest.kt29 .doOnNext { if (++i > 100) latch.trySend(Unit) } in <lambda>()
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/test/flow/sharing/
DShareInTest.kt170 in 1..threshold -> log.trySend("sub$i: $value") in <lambda>()
174 .onCompletion { log.trySend("sub$i: completion") } in <lambda>()
/external/kotlinx.coroutines/reactive/kotlinx-coroutines-rx3/test/
DObservableSourceAsFlowStressTest.kt30 .doOnNext { if (++i > 100) latch.trySend(Unit) } in <lambda>()

123