David W
12/03/2021, 11:14 PMval someStateFlow: StateFlow<Unit> = ...
GlobalScope.launch(Dispatchers.Default) { someStateFlow.collect { ... } }
Joffrey
12/03/2021, 11:18 PMcollect
call has a suspension point, so the thread is regularly yielded to other coroutines (they can interlace freely)David W
12/03/2021, 11:21 PMJoffrey
12/03/2021, 11:21 PMGlobalScope
😄David W
12/03/2021, 11:22 PM