https://kotlinlang.org logo
#coroutines
Title
# coroutines
r

redrield

07/07/2018, 8:44 PM
Specifically I'm talking about getResult() from firebase firestore. It throws an exception if the task isn't completed, and they have "add listener" crap that you can use, but I'd like to just call something like getResult in the commonpool context and have it suspend until the task is completed
You also can use any existing coroutine adapter as reference. For example take a look at my retrofit adapter for coroutines: https://github.com/gildor/kotlin-coroutines-retrofit/blob/master/src/main/kotlin/ru/gildor/coroutines/retrofit/CallAwait.kt
r

redrield

07/08/2018, 2:39 PM
Yeah I found the first thing you linked a bit after posting this and it works. Sorry
3 Views