Rohan Maity
09/20/2023, 6:41 AMflowOn
Sam
09/20/2023, 6:59 AMflowOn
effectively changes the context in which the flow is collected. In a regular flow, the collector coroutine is actually executing the code in the upstream flow, so changing the collector's context also changes the context in which the upstream flow is executed. But in a SharedFlow
, there is a separate coroutine executing the upstream flow. Changing the collector's context does not affect the context of the separate producer coroutine.shareIn
Rohan Maity
09/20/2023, 7:05 AM