https://kotlinlang.org logo
#coroutines
Title
# coroutines
p

Patrick Steiger

09/27/2023, 7:52 PM
Is a
MutableSharedFlow(0, 1, DROP_OLDEST)
guaranteed to immediately deliver events (without dropping any event ever) when emitting with a single single/threaded emitter (
tryEmit
) to collectors collecting with a
DirectDispatcher
if collectors with direct dispatcher don’t suspend? Even if there are other collectors with other dispatchers that can suspend?
Copy code
object DirectDispatcher : CoroutineDispatcher() {
  override fun dispatch(…) {
    block.run()
  }
}