Home
last modified time | relevance | path

Searched refs:BufferOverflow (Results 1 – 25 of 394) sorted by relevance

12345678910>>...16

/aosp_15_r20/external/kotlinx.coroutines/kotlinx-coroutines-core/common/test/flow/sharing/
H A DShareInConflationTest.kt17 onBufferOverflow: BufferOverflow = BufferOverflow.DROP_OLDEST, in <lambda>()
34 … val first = if (onBufferOverflow == BufferOverflow.DROP_LATEST) 0 else n - bufferCapacity in <lambda>()
67 … buffer(onBufferOverflow = BufferOverflow.DROP_OLDEST).shareIn(it, SharingStarted.Eagerly, 1) in <lambda>()
73 … buffer(onBufferOverflow = BufferOverflow.DROP_OLDEST).shareIn(it, SharingStarted.Eagerly, 0) in <lambda>()
79 … buffer(onBufferOverflow = BufferOverflow.DROP_OLDEST).shareIn(it, SharingStarted.Eagerly, 10) in <lambda>()
85 … buffer(20, onBufferOverflow = BufferOverflow.DROP_OLDEST).shareIn(it, SharingStarted.Eagerly, 0) in <lambda>()
91 … buffer(7, onBufferOverflow = BufferOverflow.DROP_OLDEST).shareIn(it, SharingStarted.Eagerly, 11) in <lambda>()
103 …buffer(23).buffer(onBufferOverflow = BufferOverflow.DROP_OLDEST).shareIn(it, SharingStarted.Eagerl… in <lambda>()
108 checkConflation(1, BufferOverflow.DROP_LATEST) { in <lambda>()
109 … buffer(onBufferOverflow = BufferOverflow.DROP_LATEST).shareIn(it, SharingStarted.Eagerly, 0) in <lambda>()
[all …]
H A DSharedFlowTest.kt504 fun testDropLatest() = testDropLatestOrOldest(BufferOverflow.DROP_LATEST) in <lambda>()
507 fun testDropOldest() = testDropLatestOrOldest(BufferOverflow.DROP_OLDEST) in <lambda>()
509 private fun testDropLatestOrOldest(bufferOverflow: BufferOverflow) = runTest { in <lambda>()
520 BufferOverflow.DROP_OLDEST -> 5 in <lambda>()
521 BufferOverflow.DROP_LATEST -> 4 in <lambda>()
685 onBufferOverflow = BufferOverflow.DROP_OLDEST in <lambda>()
760 …egalArgumentException> { MutableSharedFlow<Int>(0, onBufferOverflow = BufferOverflow.DROP_LATEST) } in <lambda>()
761 …egalArgumentException> { MutableSharedFlow<Int>(0, onBufferOverflow = BufferOverflow.DROP_OLDEST) } in <lambda>()
H A DStateInTest.kt22 assertSame(state, state.buffer(onBufferOverflow = BufferOverflow.DROP_OLDEST)) in <lambda>()
23 assertSame(state, state.buffer(0, onBufferOverflow = BufferOverflow.DROP_OLDEST)) in <lambda>()
24 assertSame(state, state.buffer(1, onBufferOverflow = BufferOverflow.DROP_OLDEST)) in <lambda>()
/aosp_15_r20/external/kotlinx.coroutines/kotlinx-coroutines-core/common/test/flow/operators/
H A DBufferConflationTest.kt17 onBufferOverflow: BufferOverflow = BufferOverflow.DROP_OLDEST, in <lambda>()
23BufferOverflow.DROP_OLDEST -> listOf(0) + (n - capacity until n).toList() // first item & capacity… in <lambda>()
24 BufferOverflow.DROP_LATEST -> (0..capacity).toList() // first & capacity following ones in <lambda>()
56 buffer(onBufferOverflow = BufferOverflow.DROP_OLDEST) in <lambda>()
62 buffer(0, onBufferOverflow = BufferOverflow.DROP_OLDEST) in <lambda>()
68 buffer(1, onBufferOverflow = BufferOverflow.DROP_OLDEST) in <lambda>()
74 buffer(10, onBufferOverflow = BufferOverflow.DROP_OLDEST) in <lambda>()
97 checkConflate(1, BufferOverflow.DROP_LATEST) { in <lambda>()
98 buffer(onBufferOverflow = BufferOverflow.DROP_LATEST) in <lambda>()
103 checkConflate(1, BufferOverflow.DROP_LATEST) { in <lambda>()
[all …]
/aosp_15_r20/external/kotlinx.coroutines/reactive/kotlinx-coroutines-reactive/test/
H A DPublisherAsFlowTest.kt186 testRequestSizeWithBuffer(Channel.RENDEZVOUS, BufferOverflow.SUSPEND, 1) in <lambda>()
190 testRequestSizeWithBuffer(1, BufferOverflow.SUSPEND, 1) in <lambda>()
194 testRequestSizeWithBuffer(10, BufferOverflow.SUSPEND, 10) in <lambda>()
198 testRequestSizeWithBuffer(Channel.UNLIMITED, BufferOverflow.SUSPEND, Long.MAX_VALUE) in <lambda>()
202 testRequestSizeWithBuffer(Channel.BUFFERED, BufferOverflow.SUSPEND, 64) in <lambda>()
206 testRequestSizeWithBuffer(Channel.BUFFERED, BufferOverflow.DROP_OLDEST, Long.MAX_VALUE) in <lambda>()
210 testRequestSizeWithBuffer(Channel.BUFFERED, BufferOverflow.DROP_LATEST, Long.MAX_VALUE) in <lambda>()
214 testRequestSizeWithBuffer(10, BufferOverflow.DROP_OLDEST, Long.MAX_VALUE) in <lambda>()
218 testRequestSizeWithBuffer(10, BufferOverflow.DROP_LATEST, Long.MAX_VALUE) in <lambda>()
226 onBufferOverflow: BufferOverflow, in <lambda>()
[all …]
/aosp_15_r20/external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/flow/internal/
H A DChannelFlow.kt29 onBufferOverflow: BufferOverflow = BufferOverflow.SUSPEND in <lambda>()
48 @JvmField public val onBufferOverflow: BufferOverflow
69 …ide fun fuse(context: CoroutineContext, capacity: Int, onBufferOverflow: BufferOverflow): Flow<T> { in dropChannelOperators()
74 val newOverflow: BufferOverflow in dropChannelOperators()
75 if (onBufferOverflow != BufferOverflow.SUSPEND) { in dropChannelOperators()
102 …n create(context: CoroutineContext, capacity: Int, onBufferOverflow: BufferOverflow): ChannelFlow<… in create()
130 … if (onBufferOverflow != BufferOverflow.SUSPEND) props.add("onBufferOverflow=$onBufferOverflow") in additionalToStringProps()
140 onBufferOverflow: BufferOverflow
183 onBufferOverflow: BufferOverflow = BufferOverflow.SUSPEND in toString()
185 …override fun create(context: CoroutineContext, capacity: Int, onBufferOverflow: BufferOverflow): C… in toString()
H A DMerge.kt14 onBufferOverflow: BufferOverflow = BufferOverflow.SUSPEND in <lambda>()
16 …override fun create(context: CoroutineContext, capacity: Int, onBufferOverflow: BufferOverflow): C… in <lambda>()
42 onBufferOverflow: BufferOverflow = BufferOverflow.SUSPEND
44 …override fun create(context: CoroutineContext, capacity: Int, onBufferOverflow: BufferOverflow): C… in create()
80 onBufferOverflow: BufferOverflow = BufferOverflow.SUSPEND in additionalToStringProps()
82 …override fun create(context: CoroutineContext, capacity: Int, onBufferOverflow: BufferOverflow): C… in additionalToStringProps()
/aosp_15_r20/external/kotlinx.coroutines/kotlinx-coroutines-core/common/test/channels/
H A DChannelFactoryTest.kt18 assertIs<BufferedChannel<*>>(Channel<Int>(Channel.UNLIMITED, BufferOverflow.DROP_OLDEST)) in testUnlimitedChannel()
19 assertIs<BufferedChannel<*>>(Channel<Int>(Channel.UNLIMITED, BufferOverflow.DROP_LATEST)) in testUnlimitedChannel()
25 assertIs<ConflatedBufferedChannel<*>>(Channel<Int>(1, BufferOverflow.DROP_OLDEST)) in testConflatedChannel()
31 assertIs<ConflatedBufferedChannel<*>>(Channel<Int>(1, BufferOverflow.DROP_LATEST)) in testBufferedChannel()
42 …assertFailsWith<IllegalArgumentException> { Channel<Int>(Channel.CONFLATED, BufferOverflow.DROP_OL… in testUnsupportedBufferOverflow()
43 …assertFailsWith<IllegalArgumentException> { Channel<Int>(Channel.CONFLATED, BufferOverflow.DROP_LA… in testUnsupportedBufferOverflow()
H A DChannelUndeliveredElementTest.kt141 testBufferOverflowStrategy(listOf(1, 2), BufferOverflow.DROP_OLDEST) in <lambda>()
142 testBufferOverflowStrategy(listOf(3), BufferOverflow.DROP_LATEST) in <lambda>()
145 …pend fun testBufferOverflowStrategy(expectedDroppedElements: List<Int>, strategy: BufferOverflow) { in <lambda>()
190 val channel = Channel<Int>(capacity, BufferOverflow.DROP_LATEST, onUndeliveredElement = { in <lambda>()
/aosp_15_r20/external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/flow/
H A DSharedFlow.kt276 onBufferOverflow: BufferOverflow = BufferOverflow.SUSPEND in emit()
280 require(replay > 0 || extraBufferCapacity > 0 || onBufferOverflow == BufferOverflow.SUSPEND) { in emit()
315 private val onBufferOverflow: BufferOverflow
426 BufferOverflow.SUSPEND -> return false // will suspend in tryEmitLocked()
427 BufferOverflow.DROP_LATEST -> return true // just drop incoming in tryEmitLocked()
428 BufferOverflow.DROP_OLDEST -> {} // force enqueue & drop oldest instead in tryEmitLocked()
709 override fun fuse(context: CoroutineContext, capacity: Int, onBufferOverflow: BufferOverflow) = in fuse()
731 onBufferOverflow: BufferOverflow in Array()
735 …ENDEZVOUS || capacity == Channel.OPTIONAL_CHANNEL) && onBufferOverflow == BufferOverflow.SUSPEND) { in Array()
H A DBuilders.kt310 onBufferOverflow: BufferOverflow = BufferOverflow.SUSPEND in channelFlow()
312 …override fun create(context: CoroutineContext, capacity: Int, onBufferOverflow: BufferOverflow): C… in channelFlow()
326 onBufferOverflow: BufferOverflow = BufferOverflow.SUSPEND
347 …override fun create(context: CoroutineContext, capacity: Int, onBufferOverflow: BufferOverflow): C…
H A DChannels.kt95 onBufferOverflow: BufferOverflow = BufferOverflow.SUSPEND in receiveAsFlow()
105 …override fun create(context: CoroutineContext, capacity: Int, onBufferOverflow: BufferOverflow): C… in receiveAsFlow()
H A DStateFlow.kt412 override fun fuse(context: CoroutineContext, capacity: Int, onBufferOverflow: BufferOverflow) = in createSlot()
419 onBufferOverflow: BufferOverflow in createSlot()
423 …if ((capacity in 0..1 || capacity == Channel.BUFFERED) && onBufferOverflow == BufferOverflow.DROP_… in createSlot()
/aosp_15_r20/external/rust/crates/ucs2/src/
Dlib.rs21 BufferOverflow, enumerator
29 Self::BufferOverflow => f.write_str("output buffer is too small"), in fmt()
109 Err(Error::BufferOverflow) in encode()
194 return Err(Error::BufferOverflow); in decode()
203 return Err(Error::BufferOverflow); in decode()
213 return Err(Error::BufferOverflow); in decode()
/aosp_15_r20/external/rust/android-crates-io/crates/ucs2/src/
Dlib.rs21 BufferOverflow, enumerator
29 Self::BufferOverflow => f.write_str("output buffer is too small"), in fmt()
109 Err(Error::BufferOverflow) in encode()
194 return Err(Error::BufferOverflow); in decode()
203 return Err(Error::BufferOverflow); in decode()
213 return Err(Error::BufferOverflow); in decode()
/aosp_15_r20/external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/channels/
H A DChannel.kt784 onBufferOverflow: BufferOverflow = BufferOverflow.SUSPEND, in Channel()
789 if (onBufferOverflow == BufferOverflow.SUSPEND) in Channel()
795 require(onBufferOverflow == BufferOverflow.SUSPEND) { in Channel()
798 ConflatedBufferedChannel(1, BufferOverflow.DROP_OLDEST, onUndeliveredElement) in Channel()
802 …if (onBufferOverflow == BufferOverflow.SUSPEND) BufferedChannel(CHANNEL_DEFAULT_CAPACITY, onUndeli… in Channel()
806 … if (onBufferOverflow === BufferOverflow.SUSPEND) BufferedChannel(capacity, onUndeliveredElement) in Channel()
H A DProduce.kt92 …produce(context, capacity, BufferOverflow.SUSPEND, CoroutineStart.DEFAULT, onCompletion = null, bl… in produce()
114 produce(context, capacity, BufferOverflow.SUSPEND, start, onCompletion, block) in produce()
120 onBufferOverflow: BufferOverflow = BufferOverflow.SUSPEND, in produce()
/aosp_15_r20/external/rust/android-crates-io/crates/ucs2/tests/
Dtests.rs12 assert_eq!(encode(input, &mut buffer), Err(Error::BufferOverflow)); in encoding()
32 Err(Error::BufferOverflow) in decoding()
36 Err(Error::BufferOverflow) in decoding()
40 Err(Error::BufferOverflow) in decoding()
/aosp_15_r20/external/rust/crates/ucs2/tests/
Dtests.rs12 assert_eq!(encode(input, &mut buffer), Err(Error::BufferOverflow)); in encoding()
32 Err(Error::BufferOverflow) in decoding()
36 Err(Error::BufferOverflow) in decoding()
40 Err(Error::BufferOverflow) in decoding()
/aosp_15_r20/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/common/ui/data/repository/
H A DFakeConfigurationRepository.kt24 import kotlinx.coroutines.channels.BufferOverflow
36 onBufferOverflow = BufferOverflow.DROP_OLDEST,
41 MutableSharedFlow<Unit>(replay = 1, onBufferOverflow = BufferOverflow.DROP_OLDEST)
45 MutableSharedFlow<Configuration>(replay = 1, onBufferOverflow = BufferOverflow.DROP_OLDEST)
/aosp_15_r20/external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/flow/operators/
H A DContext.kt121 …> Flow<T>.buffer(capacity: Int = BUFFERED, onBufferOverflow: BufferOverflow = BufferOverflow.SUSPE… in buffer()
125 require(capacity != CONFLATED || onBufferOverflow == BufferOverflow.SUSPEND) { in buffer()
133 onBufferOverflow = BufferOverflow.DROP_OLDEST in buffer()
H A DShare.kt150 @JvmField val onBufferOverflow: BufferOverflow,
168 … onBufferOverflow == BufferOverflow.SUSPEND -> // buffer was configured with suspension in configureSharing()
184 onBufferOverflow = BufferOverflow.SUSPEND, in configureSharing()
371 override fun fuse(context: CoroutineContext, capacity: Int, onBufferOverflow: BufferOverflow) = in asSharedFlow()
380 override fun fuse(context: CoroutineContext, capacity: Int, onBufferOverflow: BufferOverflow) = in fuse()
/aosp_15_r20/external/kotlinx.coroutines/reactive/kotlinx-coroutines-reactive/src/
H A DReactiveFlow.kt48 onBufferOverflow: BufferOverflow = BufferOverflow.SUSPEND in <lambda>()
50 …override fun create(context: CoroutineContext, capacity: Int, onBufferOverflow: BufferOverflow): C… in <lambda>()
61 if (onBufferOverflow != BufferOverflow.SUSPEND) { in <lambda>()
115 onBufferOverflow: BufferOverflow,
/aosp_15_r20/frameworks/base/packages/SystemUI/src/com/android/systemui/assist/data/repository/
H A DAssistRepository.kt21 import kotlinx.coroutines.channels.BufferOverflow
29 MutableSharedFlow<Int>(replay = 1, onBufferOverflow = BufferOverflow.DROP_OLDEST)
/aosp_15_r20/external/lottie/lottie-compose/src/main/java/com/airbnb/lottie/compose/
H A DLottieRetrySignal.kt9 import kotlinx.coroutines.channels.BufferOverflow
33 private val channel = Channel<Unit>(capacity = 1, onBufferOverflow = BufferOverflow.DROP_OLDEST)

12345678910>>...16