A `StateFlow` can't be collected by multiple colle...
# coroutines
d
A
StateFlow
can't be collected by multiple collectors (maybe it just fans-out?)?
Copy code
val state = MutableStateFlow(1)
val scope = CoroutineScope(<http://Dispatchers.IO|Dispatchers.IO>)

runBlocking {
	println("start")
	state.onEach { println("$it-1") }.launchIn(scope)
	println("here")

	state.value = 2
	state.onEach { println("$it-2") }.launchIn(scope)

	state.value = 3
	println("finished")
	
//	scope.coroutineContext[Job]!!.join()
}
results in:
Copy code
start
here
2-1
finished
3-2
(If I uncomment the last line, it hangs the scratch... so maybe I'm just loosing the emissions?)