File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
core/kotlinx-coroutines-core/src/main/kotlin/kotlinx/coroutines/experimental/channels Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 1616
1717package kotlinx.coroutines.experimental.channels
1818
19- import kotlinx.coroutines.experimental.Unconfined
20- import kotlinx.coroutines.experimental.runBlocking
21- import kotlin.coroutines.experimental.CoroutineContext
19+ import kotlinx.coroutines.experimental.*
20+ import kotlin.coroutines.experimental.*
2221
2322internal const val DEFAULT_CLOSE_MESSAGE = " Channel was closed"
2423
@@ -884,9 +883,7 @@ public suspend fun <E> ReceiveChannel<E>.toSet(): Set<E> =
884883public fun <E , R > ReceiveChannel<E>.flatMap (context : CoroutineContext = Unconfined , transform : suspend (E ) -> ReceiveChannel <R >): ReceiveChannel <R > =
885884 produce(context) {
886885 consumeEach {
887- transform(it).consumeEach {
888- send(it)
889- }
886+ transform(it).toChannel(this )
890887 }
891888 }
892889
You can’t perform that action at this time.
0 commit comments