File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
core/kotlinx-coroutines-core/src/main/kotlin/kotlinx/coroutines/experimental/channels Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -577,8 +577,19 @@ public inline suspend fun <E, C : SendChannel<E>> ReceiveChannel<E>.filterIndexe
577577 * This function [consumes][consume] all elements of the original [ReceiveChannel].
578578 */
579579// todo: mark predicate with crossinline modifier when it is supported: https://youtrack.jetbrains.com/issue/KT-19159
580- public fun <E > ReceiveChannel<E>.filterNot (predicate : suspend (E ) -> Boolean ): ReceiveChannel <E > =
581- filter { ! predicate(it) }
580+ public fun <E > ReceiveChannel<E>.filterNot (context : CoroutineContext = Unconfined , predicate : suspend (E ) -> Boolean ): ReceiveChannel <E > =
581+ filter(context) { ! predicate(it) }
582+
583+ /* *
584+ * Returns a channel containing all elements not matching the given [predicate].
585+ *
586+ * The operation is _intermediate_ and _stateless_.
587+ * This function [consumes][consume] all elements of the original [ReceiveChannel].
588+ *
589+ * @suppress **Deprecated**: For binary compatibility only
590+ */
591+ @Deprecated(" For binary compatibility only" , level = DeprecationLevel .HIDDEN )
592+ public fun <E > ReceiveChannel<E>.filterNot (predicate : suspend (E ) -> Boolean ): ReceiveChannel <E > = filterNot(predicate = predicate)
582593
583594/* *
584595 * Returns a channel containing all elements that are not `null`.
You can’t perform that action at this time.
0 commit comments