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

Luis Munoz

06/16/2020, 5:14 PM
I have a function that returns a flow witch emits only once, is there an operator that will call the method again giving an infinite flow until an error occurs? Maybe this a bad idea but seems fine to me. I have a function from a third party library that does polling for changes that returns a completeablefuture and I want to create a flow that emits on every change.
never mind doing it with a while loop and
Copy code
callbackFlow
and not using any kind of operator
b

bdawg.io

06/16/2020, 10:30 PM
Also consider a generator and converting it to a flow if your value is calculated synchronously
2 Views