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.
Luis Munoz
06/16/2020, 5:20 PM
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