Coming from rx java I was waiting for the `replay`...
# coroutines
u
Coming from rx java I was waiting for the
replay
operators to migrate to Flow. I see the
shareIn()
but unsure what the scope parameter should be?
g
shareIn (and other operators which create hot flow) require scope on which this hot flow will work, because it starts collecting upstream flow and cache values, so to avoid violation of structured concurrence you need some scope to which this flow will be attached Let’s say if it inside of class with scope, use it, if it’s just top level thing which should be never cancelled, just use GlobalScope (but careful with it)
If GlobalScope is essentially the same what RxJava so no structured concurrence