We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 384bc41 commit 7c01501Copy full SHA for 7c01501
app/src/main/java/com/lukaslechner/coroutineusecasesonandroid/playground/flow/channels/1_sending_single_value.kt
@@ -0,0 +1,19 @@
1
+package com.lukaslechner.coroutineusecasesonandroid.playground.flow.channels
2
+
3
+import kotlinx.coroutines.async
4
+import kotlinx.coroutines.coroutineScope
5
+import kotlinx.coroutines.delay
6
+import kotlinx.coroutines.launch
7
8
+suspend fun main(): Unit = coroutineScope {
9
10
+ val deferred = async {
11
+ delay(100) // some computation
12
+ 10
13
+ }
14
15
+ launch {
16
+ val result = deferred.await()
17
+ println(result)
18
19
+}
0 commit comments