I have a function that returns a flow witch emits ...
# coroutines
l
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
Also consider a generator and converting it to a flow if your value is calculated synchronously