Lukas Lechner
08/12/2022, 10:00 AMsimon.vergauwen
08/12/2022, 10:01 AMflow { coroutineScope { } }.
The only thing that is forbidden is emit from a different Coroutine, but following is valid.
flow {
  coroutineScope {
    launch { /** do something */ }
    while(true) {
      currentCoroutineContext().ensureActive()
      emit(1)
    }
  }
}Joffrey
08/12/2022, 10:07 AMcallbackFlow (or maybe channelFlow) depending on what you're trying to doLukas Lechner
08/12/2022, 10:16 AMLukas Lechner
08/14/2022, 8:23 AMcoroutineScope , the flow suspends until the launched Coroutine has completed. How can I create a Coroutine that runs concurrently with the flow?Lukas Lechner
08/14/2022, 8:27 AMNick Allen
08/15/2022, 7:21 PMcoroutineScope instead of inside it?