--

Hey, thanks for your comment!

Indeed, `flatMapConcurrently` is one of the latest additions to the project and is a custom implementation. However, a lengthy description about it can be found in the file containing it, that is `CoroutinesFlowConcurrency.kt`

If you need the reasoning behind this, our Team were trying different built-in `flatMap` operators how to process Intents:

- `flatMapConcat` - this one created unresponsive UI when user Internet connection was slow

- `flatMapMerge` - this one was sometimes too unpredictable when you need to preserve your Intents' order

- `flatMapLatest` is obviously inadequate for this use-case

As Kotlin is currently missing queue-like `flatMap`, that is "concurrent but preserving order of operations", `flatMapConcurrently` was created based on this lengthy Kotlin Coroutines issue about it :) https://github.com/Kotlin/kotlinx.coroutines/issues/1147

Hope it makes things more clear!

--

--