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)