Join Slack
Powered by
How can I use await method in not suspend function...
# coroutines
w
wickedev
05/22/2018, 8:06 AM
How can I use await method in not suspend function as like this test code:
https://github.com/Kotlin/kotlinx.coroutines/blob/master/js/kotlinx-coroutines-core-js/src/test/kotlin/kotlinx/coroutines/experimental/PromiseTest.kt
d
diesieben07
05/22/2018, 8:13 AM
It
is
actually in a suspending lambda in the code you linked,
promise
is a function that takes a suspending lambda (which can then call
await
).
w
wickedev
05/22/2018, 8:17 AM
Oh got it! thank you
2
Views
Open in Slack
Previous
Next