Skip to content

Commit 5183b62

Browse files
thibseiselThibault SEISEL
and
Thibault SEISEL
authored
Replace references to deprecated delayEach operator (#2127)
Co-authored-by: Thibault SEISEL <[email protected]>
1 parent 75dede3 commit 5183b62

File tree

1 file changed

+6
-6
lines changed
  • kotlinx-coroutines-core/common/src/flow/operators

1 file changed

+6
-6
lines changed

kotlinx-coroutines-core/common/src/flow/operators/Zip.kt

+6-6
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import kotlinx.coroutines.flow.internal.unsafeFlow as flow
2020
*
2121
* It can be demonstrated with the following example:
2222
* ```
23-
* val flow = flowOf(1, 2).delayEach(10)
24-
* val flow2 = flowOf("a", "b", "c").delayEach(15)
23+
* val flow = flowOf(1, 2).onEach { delay(10) }
24+
* val flow2 = flowOf("a", "b", "c").onEach { delay(15) }
2525
* flow.combine(flow2) { i, s -> i.toString() + s }.collect {
2626
* println(it) // Will print "1a 2a 2b 2c"
2727
* }
@@ -42,8 +42,8 @@ public fun <T1, T2, R> Flow<T1>.combine(flow: Flow<T2>, transform: suspend (a: T
4242
*
4343
* It can be demonstrated with the following example:
4444
* ```
45-
* val flow = flowOf(1, 2).delayEach(10)
46-
* val flow2 = flowOf("a", "b", "c").delayEach(15)
45+
* val flow = flowOf(1, 2).onEach { delay(10) }
46+
* val flow2 = flowOf("a", "b", "c").onEach { delay(15) }
4747
* combine(flow, flow2) { i, s -> i.toString() + s }.collect {
4848
* println(it) // Will print "1a 2a 2b 2c"
4949
* }
@@ -292,8 +292,8 @@ public inline fun <reified T, R> combineTransform(
292292
*
293293
* It can be demonstrated with the following example:
294294
* ```
295-
* val flow = flowOf(1, 2, 3).delayEach(10)
296-
* val flow2 = flowOf("a", "b", "c", "d").delayEach(15)
295+
* val flow = flowOf(1, 2, 3).onEach { delay(10) }
296+
* val flow2 = flowOf("a", "b", "c", "d").onEach { delay(15) }
297297
* flow.zip(flow2) { i, s -> i.toString() + s }.collect {
298298
* println(it) // Will print "1a 2b 3c"
299299
* }

0 commit comments

Comments
 (0)