Skip to content

Commit 36cf52c

Browse files
Code before recording video aboug launchIn
1 parent a4196d2 commit 36cf52c

File tree

1 file changed

+22
-0
lines changed
  • app/src/main/java/com/lukaslechner/coroutineusecasesonandroid/playground/flow/terminal_operators

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package com.lukaslechner.coroutineusecasesonandroid.playground.flow.terminal_operators
2+
3+
import kotlinx.coroutines.delay
4+
import kotlinx.coroutines.flow.flow
5+
6+
fun main() {
7+
8+
val flow = flow {
9+
delay(100)
10+
11+
println("Emitting first value")
12+
emit(1)
13+
14+
delay(100)
15+
16+
println("Emitting second value")
17+
emit(2)
18+
}
19+
20+
21+
22+
}

0 commit comments

Comments
 (0)