@@ -464,7 +464,7 @@ Caught an assertion error
Another crucial difference between regular and supervisor jobs is exception handling.
Every child should handle its exceptions by itself via the exception handling mechanism.
This difference comes from the fact that child's failure does not propagate to the parent.
-It means that coroutines launched directly inside the [supervisorScope] _do_ use the [CoroutineExceptionHandler]
+It means that coroutines launched directly inside the [supervisorScope][_supervisorScope] _do_ use the [CoroutineExceptionHandler]
that is installed in their scope in the same way as root coroutines do
(see the [CoroutineExceptionHandler](#coroutineexceptionhandler) section for details).
@@ -517,8 +517,8 @@ The scope is completed
[runBlocking]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/run-blocking.html
[SupervisorJob()]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-supervisor-job.html
[Job()]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-job.html
-[coroutineScope]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/coroutine-scope.html
-[supervisorScope]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/supervisor-scope.html
+[_coroutineScope]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/coroutine-scope.html
+[_supervisorScope]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/supervisor-scope.html
[actor]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/actor.html
[produce]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/produce.html
diff --git a/docs/flow.md b/docs/flow.md
index 2b1dfd59a9..4374e7aa86 100644
--- a/docs/flow.md
+++ b/docs/flow.md
@@ -203,7 +203,7 @@ I'm not blocked 3
Notice the following differences in the code with the [Flow] from the earlier examples:
-* A builder function for [Flow] type is called [flow].
+* A builder function for [Flow] type is called [flow][_flow].
* Code inside the `flow { ... }` builder block can suspend.
* The `simple` function is no longer marked with `suspend` modifier.
* Values are _emitted_ from the flow using [emit][FlowCollector.emit] function.
@@ -214,7 +214,7 @@ thread is blocked in this case.
### Flows are cold
-Flows are _cold_ streams similar to sequences — the code inside a [flow] builder does not
+Flows are _cold_ streams similar to sequences — the code inside a [flow][_flow] builder does not
run until the flow is collected. This becomes clear in the following example:
@@ -1785,7 +1785,7 @@ coroutine only without cancelling the whole scope or to [join][Job.join] it.
### Flow cancellation checks
-For convenience, the [flow] builder performs additional [ensureActive] checks for cancellation on each emitted value.
+For convenience, the [flow][_flow] builder performs additional [ensureActive] checks for cancellation on each emitted value.
It means that a busy loop emitting from a `flow { ... }` is cancellable:
@@ -1944,7 +1944,7 @@ Integration modules include conversions from and to `Flow`, integration with Rea
[CancellationException]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-cancellation-exception/index.html
[Flow]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html
-[flow]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/flow.html
+[_flow]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/flow.html
[FlowCollector.emit]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow-collector/emit.html
[collect]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/collect.html
[flowOf]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/flow-of.html
diff --git a/gradle.properties b/gradle.properties
index 18b95166d6..75c07d3833 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -3,14 +3,14 @@
#
# Kotlin
-version=1.4.0-M1-SNAPSHOT
+version=1.4.0-SNAPSHOT
group=org.jetbrains.kotlinx
kotlin_version=1.4.0
# Dependencies
junit_version=4.12
atomicfu_version=0.14.4
-knit_version=0.2.0
+knit_version=0.2.2
html_version=0.6.8
lincheck_version=2.7.1
dokka_version=0.9.16-rdev-2-mpp-hacks
diff --git a/kotlinx-coroutines-core/api/kotlinx-coroutines-core.api b/kotlinx-coroutines-core/api/kotlinx-coroutines-core.api
index bb1c0f36ab..b86076fca1 100644
--- a/kotlinx-coroutines-core/api/kotlinx-coroutines-core.api
+++ b/kotlinx-coroutines-core/api/kotlinx-coroutines-core.api
@@ -394,6 +394,7 @@ public final class kotlinx/coroutines/JobKt {
public static final fun cancelFutureOnCompletion (Lkotlinx/coroutines/Job;Ljava/util/concurrent/Future;)Lkotlinx/coroutines/DisposableHandle;
public static final fun ensureActive (Lkotlin/coroutines/CoroutineContext;)V
public static final fun ensureActive (Lkotlinx/coroutines/Job;)V
+ public static final fun getJob (Lkotlin/coroutines/CoroutineContext;)Lkotlinx/coroutines/Job;
public static final fun isActive (Lkotlin/coroutines/CoroutineContext;)Z
}
@@ -941,7 +942,9 @@ public final class kotlinx/coroutines/flow/FlowKt {
public static final fun count (Lkotlinx/coroutines/flow/Flow;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun count (Lkotlinx/coroutines/flow/Flow;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun debounce (Lkotlinx/coroutines/flow/Flow;J)Lkotlinx/coroutines/flow/Flow;
+ public static final fun debounce (Lkotlinx/coroutines/flow/Flow;Lkotlin/jvm/functions/Function1;)Lkotlinx/coroutines/flow/Flow;
public static final fun debounce-8GFy2Ro (Lkotlinx/coroutines/flow/Flow;D)Lkotlinx/coroutines/flow/Flow;
+ public static final fun debounceDuration (Lkotlinx/coroutines/flow/Flow;Lkotlin/jvm/functions/Function1;)Lkotlinx/coroutines/flow/Flow;
public static final fun delayEach (Lkotlinx/coroutines/flow/Flow;J)Lkotlinx/coroutines/flow/Flow;
public static final fun delayFlow (Lkotlinx/coroutines/flow/Flow;J)Lkotlinx/coroutines/flow/Flow;
public static final fun distinctUntilChanged (Lkotlinx/coroutines/flow/Flow;)Lkotlinx/coroutines/flow/Flow;
@@ -989,7 +992,6 @@ public final class kotlinx/coroutines/flow/FlowKt {
public static final fun merge (Lkotlinx/coroutines/flow/Flow;)Lkotlinx/coroutines/flow/Flow;
public static final fun merge ([Lkotlinx/coroutines/flow/Flow;)Lkotlinx/coroutines/flow/Flow;
public static final fun observeOn (Lkotlinx/coroutines/flow/Flow;Lkotlin/coroutines/CoroutineContext;)Lkotlinx/coroutines/flow/Flow;
- public static final synthetic fun onCompletion (Lkotlinx/coroutines/flow/Flow;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static final fun onCompletion (Lkotlinx/coroutines/flow/Flow;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/flow/Flow;
public static final fun onEach (Lkotlinx/coroutines/flow/Flow;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static final fun onEmpty (Lkotlinx/coroutines/flow/Flow;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
diff --git a/kotlinx-coroutines-core/common/src/Builders.common.kt b/kotlinx-coroutines-core/common/src/Builders.common.kt
index c0924a0238..b7deaccb72 100644
--- a/kotlinx-coroutines-core/common/src/Builders.common.kt
+++ b/kotlinx-coroutines-core/common/src/Builders.common.kt
@@ -175,7 +175,6 @@ public suspend fun
withContext(
*
* This inline function calls [withContext].
*/
-@ExperimentalCoroutinesApi
public suspend inline operator fun CoroutineDispatcher.invoke(
noinline block: suspend CoroutineScope.() -> T
): T = withContext(this, block)
diff --git a/kotlinx-coroutines-core/common/src/CompletableDeferred.kt b/kotlinx-coroutines-core/common/src/CompletableDeferred.kt
index 0605817afa..2f00847298 100644
--- a/kotlinx-coroutines-core/common/src/CompletableDeferred.kt
+++ b/kotlinx-coroutines-core/common/src/CompletableDeferred.kt
@@ -57,7 +57,6 @@ public interface CompletableDeferred : Deferred {
* This function transitions this deferred in the same ways described by [CompletableDeferred.complete] and
* [CompletableDeferred.completeExceptionally].
*/
-@ExperimentalCoroutinesApi // since 1.3.2, tentatively until 1.4.0
public fun CompletableDeferred.completeWith(result: Result): Boolean =
result.fold({ complete(it) }, { completeExceptionally(it) })
diff --git a/kotlinx-coroutines-core/common/src/CoroutineStart.kt b/kotlinx-coroutines-core/common/src/CoroutineStart.kt
index 05e80e3ed7..d5791c79fe 100644
--- a/kotlinx-coroutines-core/common/src/CoroutineStart.kt
+++ b/kotlinx-coroutines-core/common/src/CoroutineStart.kt
@@ -55,7 +55,7 @@ public enum class CoroutineStart {
* Cancellability of coroutine at suspension points depends on the particular implementation details of
* suspending functions as in [DEFAULT].
*/
- @ExperimentalCoroutinesApi
+ @ExperimentalCoroutinesApi // Since 1.0.0, no ETA on stability
ATOMIC,
/**
@@ -71,7 +71,7 @@ public enum class CoroutineStart {
*
* **Note: This is an experimental api.** Execution semantics of coroutines may change in the future when this mode is used.
*/
- @ExperimentalCoroutinesApi
+ @ExperimentalCoroutinesApi // Since 1.0.0, no ETA on stability
UNDISPATCHED;
/**
diff --git a/kotlinx-coroutines-core/common/src/Debug.common.kt b/kotlinx-coroutines-core/common/src/Debug.common.kt
index 013b983a74..949b05c63f 100644
--- a/kotlinx-coroutines-core/common/src/Debug.common.kt
+++ b/kotlinx-coroutines-core/common/src/Debug.common.kt
@@ -27,7 +27,7 @@ internal expect fun assert(value: () -> Boolean)
* Copy mechanism is used only on JVM, but it might be convenient to implement it in common exceptions,
* so on JVM their stacktraces will be properly recovered.
*/
-@ExperimentalCoroutinesApi
+@ExperimentalCoroutinesApi // Since 1.2.0, no ETA on stability
public interface CopyableThrowable where T : Throwable, T : CopyableThrowable {
/**
diff --git a/kotlinx-coroutines-core/common/src/Delay.kt b/kotlinx-coroutines-core/common/src/Delay.kt
index f7948443fa..aae623d5df 100644
--- a/kotlinx-coroutines-core/common/src/Delay.kt
+++ b/kotlinx-coroutines-core/common/src/Delay.kt
@@ -95,7 +95,6 @@ public interface Delay {
* }
* ```
*/
-@ExperimentalCoroutinesApi
public suspend fun awaitCancellation(): Nothing = suspendCancellableCoroutine {}
/**
diff --git a/kotlinx-coroutines-core/common/src/Job.kt b/kotlinx-coroutines-core/common/src/Job.kt
index 754fa43ece..2e05635a29 100644
--- a/kotlinx-coroutines-core/common/src/Job.kt
+++ b/kotlinx-coroutines-core/common/src/Job.kt
@@ -634,6 +634,15 @@ public fun CoroutineContext.cancelChildren(cause: CancellationException? = null)
@Deprecated(level = DeprecationLevel.HIDDEN, message = "Since 1.2.0, binary compatibility with versions <= 1.1.x")
public fun CoroutineContext.cancelChildren(): Unit = cancelChildren(null)
+/**
+ * Retrieves the current [Job] instance from the given [CoroutineContext] or
+ * throws [IllegalStateException] if no job is present in the context.
+ *
+ * This method is a short-cut for `coroutineContext[Job]!!` and should be used only when it is known in advance that
+ * the context does have instance of the job in it.
+ */
+public val CoroutineContext.job: Job get() = get(Job) ?: error("Current context doesn't contain Job in it: $this")
+
/**
* @suppress This method has bad semantics when cause is not a [CancellationException]. Use [CoroutineContext.cancelChildren].
*/
diff --git a/kotlinx-coroutines-core/common/src/channels/AbstractChannel.kt b/kotlinx-coroutines-core/common/src/channels/AbstractChannel.kt
index 53ecf06a2c..8edd2b310c 100644
--- a/kotlinx-coroutines-core/common/src/channels/AbstractChannel.kt
+++ b/kotlinx-coroutines-core/common/src/channels/AbstractChannel.kt
@@ -137,14 +137,6 @@ internal abstract class AbstractSendChannel(
return sendSuspend(element)
}
- internal suspend fun sendFair(element: E) {
- if (offerInternal(element) === OFFER_SUCCESS) {
- yield() // Works only on fast path to properly work in sequential use-cases
- return
- }
- return sendSuspend(element)
- }
-
public final override fun offer(element: E): Boolean {
val result = offerInternal(element)
return when {
diff --git a/kotlinx-coroutines-core/common/src/channels/Broadcast.kt b/kotlinx-coroutines-core/common/src/channels/Broadcast.kt
index 790580e0a3..0193ed06b2 100644
--- a/kotlinx-coroutines-core/common/src/channels/Broadcast.kt
+++ b/kotlinx-coroutines-core/common/src/channels/Broadcast.kt
@@ -47,7 +47,7 @@ public fun ReceiveChannel.broadcast(
val scope = GlobalScope + Dispatchers.Unconfined + CoroutineExceptionHandler { _, _ -> }
// We can run this coroutine in the context that ignores all exceptions, because of `onCompletion = consume()`
// which passes all exceptions upstream to the source ReceiveChannel
- return scope.broadcast(capacity = capacity, start = start, onCompletion = consumes()) {
+ return scope.broadcast(capacity = capacity, start = start, onCompletion = { cancelConsumed(it) }) {
for (e in this@broadcast) {
send(e)
}
diff --git a/kotlinx-coroutines-core/common/src/channels/BufferOverflow.kt b/kotlinx-coroutines-core/common/src/channels/BufferOverflow.kt
index 99994ea81b..a89c633fe6 100644
--- a/kotlinx-coroutines-core/common/src/channels/BufferOverflow.kt
+++ b/kotlinx-coroutines-core/common/src/channels/BufferOverflow.kt
@@ -16,7 +16,6 @@ import kotlinx.coroutines.*
* * [DROP_LATEST] — drop **the latest** value that is being added to the buffer right now on buffer overflow
* (so that buffer contents stay the same), do not suspend.
*/
-@ExperimentalCoroutinesApi
public enum class BufferOverflow {
/**
* Suspend on buffer overflow.
diff --git a/kotlinx-coroutines-core/common/src/channels/ChannelCoroutine.kt b/kotlinx-coroutines-core/common/src/channels/ChannelCoroutine.kt
index 3f53b48c53..a75d466199 100644
--- a/kotlinx-coroutines-core/common/src/channels/ChannelCoroutine.kt
+++ b/kotlinx-coroutines-core/common/src/channels/ChannelCoroutine.kt
@@ -34,9 +34,4 @@ internal open class ChannelCoroutine(
_channel.cancel(exception) // cancel the channel
cancelCoroutine(exception) // cancel the job
}
-
- @Suppress("UNCHECKED_CAST")
- suspend fun sendFair(element: E) {
- (_channel as AbstractSendChannel).sendFair(element)
- }
}
diff --git a/kotlinx-coroutines-core/common/src/channels/Channels.common.kt b/kotlinx-coroutines-core/common/src/channels/Channels.common.kt
index d19028bf63..398d5ca44b 100644
--- a/kotlinx-coroutines-core/common/src/channels/Channels.common.kt
+++ b/kotlinx-coroutines-core/common/src/channels/Channels.common.kt
@@ -3,7 +3,7 @@
*/
@file:JvmMultifileClass
@file:JvmName("ChannelsKt")
-@file:Suppress("DEPRECATION")
+@file:Suppress("DEPRECATION_ERROR")
package kotlinx.coroutines.channels
@@ -52,7 +52,7 @@ public inline fun BroadcastChannel.consume(block: ReceiveChannel.()
* to find bugs.
*/
@Suppress("EXTENSION_SHADOWED_BY_MEMBER")
-@ExperimentalCoroutinesApi // since 1.3.0, tentatively stable in 1.4.0
+@ExperimentalCoroutinesApi // since 1.3.0, tentatively stable in 1.4.x
public suspend fun ReceiveChannel.receiveOrNull(): E? {
@Suppress("DEPRECATION", "UNCHECKED_CAST")
return (this as ReceiveChannel).receiveOrNull()
@@ -68,7 +68,7 @@ public suspend fun ReceiveChannel.receiveOrNull(): E? {
* these extensions do not accidentally confuse `null` value and a normally closed channel, leading to hard
* to find bugs.
**/
-@ExperimentalCoroutinesApi // since 1.3.0, tentatively stable in 1.4.0
+@ExperimentalCoroutinesApi // since 1.3.0, tentatively stable in 1.4.x
public fun ReceiveChannel.onReceiveOrNull(): SelectClause1 {
@Suppress("DEPRECATION", "UNCHECKED_CAST")
return (this as ReceiveChannel).onReceiveOrNull
@@ -102,8 +102,8 @@ public suspend inline fun BroadcastChannel.consumeEach(action: (E) -> Uni
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public fun ReceiveChannel<*>.consumes(): CompletionHandler = { cause: Throwable? ->
cancelConsumed(cause)
@@ -125,8 +125,8 @@ internal fun ReceiveChannel<*>.cancelConsumed(cause: Throwable?) {
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public fun consumesAll(vararg channels: ReceiveChannel<*>): CompletionHandler =
{ cause: Throwable? ->
@@ -150,7 +150,6 @@ public fun consumesAll(vararg channels: ReceiveChannel<*>): CompletionHandler =
*
* The operation is _terminal_.
*/
-@ExperimentalCoroutinesApi // since 1.3.0, tentatively graduates in 1.4.0
public inline fun ReceiveChannel.consume(block: ReceiveChannel.() -> R): R {
var cause: Throwable? = null
try {
@@ -171,7 +170,6 @@ public inline fun ReceiveChannel.consume(block: ReceiveChannel.() -
* The operation is _terminal_.
* This function [consumes][ReceiveChannel.consume] all elements of the original [ReceiveChannel].
*/
-@ExperimentalCoroutinesApi // since 1.3.0, tentatively graduates in 1.4.0
public suspend inline fun ReceiveChannel.consumeEach(action: (E) -> Unit): Unit =
consume {
for (e in this) action(e)
@@ -187,8 +185,8 @@ public suspend inline fun ReceiveChannel.consumeEach(action: (E) -> Unit)
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend inline fun ReceiveChannel.consumeEachIndexed(action: (IndexedValue) -> Unit) {
var index = 0
@@ -207,8 +205,8 @@ public suspend inline fun ReceiveChannel.consumeEachIndexed(action: (Inde
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend fun ReceiveChannel.elementAt(index: Int): E =
elementAtOrElse(index) { throw IndexOutOfBoundsException("ReceiveChannel doesn't contain element at index $index.") }
@@ -223,8 +221,8 @@ public suspend fun ReceiveChannel.elementAt(index: Int): E =
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend inline fun ReceiveChannel.elementAtOrElse(index: Int, defaultValue: (Int) -> E): E =
consume {
@@ -248,8 +246,8 @@ public suspend inline fun ReceiveChannel.elementAtOrElse(index: Int, defa
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend fun ReceiveChannel.elementAtOrNull(index: Int): E? =
consume {
@@ -273,8 +271,8 @@ public suspend fun ReceiveChannel.elementAtOrNull(index: Int): E? =
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend inline fun ReceiveChannel.find(predicate: (E) -> Boolean): E? =
firstOrNull(predicate)
@@ -289,8 +287,8 @@ public suspend inline fun ReceiveChannel.find(predicate: (E) -> Boolean):
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend inline fun ReceiveChannel.findLast(predicate: (E) -> Boolean): E? =
lastOrNull(predicate)
@@ -306,8 +304,8 @@ public suspend inline fun ReceiveChannel.findLast(predicate: (E) -> Boole
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend fun ReceiveChannel.first(): E =
consume {
@@ -328,8 +326,8 @@ public suspend fun ReceiveChannel.first(): E =
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend inline fun ReceiveChannel.first(predicate: (E) -> Boolean): E {
consumeEach {
@@ -348,8 +346,8 @@ public suspend inline fun ReceiveChannel.first(predicate: (E) -> Boolean)
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend fun ReceiveChannel.firstOrNull(): E? =
consume {
@@ -369,8 +367,8 @@ public suspend fun ReceiveChannel.firstOrNull(): E? =
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend inline fun ReceiveChannel.firstOrNull(predicate: (E) -> Boolean): E? {
consumeEach {
@@ -389,8 +387,8 @@ public suspend inline fun ReceiveChannel.firstOrNull(predicate: (E) -> Bo
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend fun ReceiveChannel.indexOf(element: E): Int {
var index = 0
@@ -412,8 +410,8 @@ public suspend fun ReceiveChannel.indexOf(element: E): Int {
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend inline fun ReceiveChannel.indexOfFirst(predicate: (E) -> Boolean): Int {
var index = 0
@@ -435,8 +433,8 @@ public suspend inline fun ReceiveChannel.indexOfFirst(predicate: (E) -> B
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend inline fun ReceiveChannel.indexOfLast(predicate: (E) -> Boolean): Int {
var lastIndex = -1
@@ -460,8 +458,8 @@ public suspend inline fun ReceiveChannel.indexOfLast(predicate: (E) -> Bo
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend fun ReceiveChannel.last(): E =
consume {
@@ -485,8 +483,8 @@ public suspend fun ReceiveChannel.last(): E =
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend inline fun ReceiveChannel.last(predicate: (E) -> Boolean): E {
var last: E? = null
@@ -512,8 +510,8 @@ public suspend inline fun ReceiveChannel.last(predicate: (E) -> Boolean):
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend fun ReceiveChannel.lastIndexOf(element: E): Int {
var lastIndex = -1
@@ -536,8 +534,8 @@ public suspend fun ReceiveChannel.lastIndexOf(element: E): Int {
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend fun ReceiveChannel.lastOrNull(): E? =
consume {
@@ -560,8 +558,8 @@ public suspend fun ReceiveChannel.lastOrNull(): E? =
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend inline fun ReceiveChannel.lastOrNull(predicate: (E) -> Boolean): E? {
var last: E? = null
@@ -583,8 +581,8 @@ public suspend inline fun ReceiveChannel.lastOrNull(predicate: (E) -> Boo
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend fun ReceiveChannel.single(): E =
consume {
@@ -607,8 +605,8 @@ public suspend fun ReceiveChannel.single(): E =
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend inline fun ReceiveChannel.single(predicate: (E) -> Boolean): E {
var single: E? = null
@@ -635,8 +633,8 @@ public suspend inline fun ReceiveChannel.single(predicate: (E) -> Boolean
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend fun ReceiveChannel.singleOrNull(): E? =
consume {
@@ -659,8 +657,8 @@ public suspend fun ReceiveChannel.singleOrNull(): E? =
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend inline fun ReceiveChannel.singleOrNull(predicate: (E) -> Boolean): E? {
var single: E? = null
@@ -686,8 +684,8 @@ public suspend inline fun ReceiveChannel.singleOrNull(predicate: (E) -> B
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public fun ReceiveChannel.drop(n: Int, context: CoroutineContext = Dispatchers.Unconfined): ReceiveChannel =
GlobalScope.produce(context, onCompletion = consumes()) {
@@ -714,8 +712,8 @@ public fun ReceiveChannel.drop(n: Int, context: CoroutineContext = Dispat
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public fun ReceiveChannel.dropWhile(context: CoroutineContext = Dispatchers.Unconfined, predicate: suspend (E) -> Boolean): ReceiveChannel =
GlobalScope.produce(context, onCompletion = consumes()) {
@@ -740,8 +738,8 @@ public fun ReceiveChannel.dropWhile(context: CoroutineContext = Dispatche
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public fun ReceiveChannel.filter(context: CoroutineContext = Dispatchers.Unconfined, predicate: suspend (E) -> Boolean): ReceiveChannel =
GlobalScope.produce(context, onCompletion = consumes()) {
@@ -762,8 +760,8 @@ public fun ReceiveChannel.filter(context: CoroutineContext = Dispatchers.
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public fun ReceiveChannel.filterIndexed(context: CoroutineContext = Dispatchers.Unconfined, predicate: suspend (index: Int, E) -> Boolean): ReceiveChannel =
GlobalScope.produce(context, onCompletion = consumes()) {
@@ -785,8 +783,8 @@ public fun ReceiveChannel.filterIndexed(context: CoroutineContext = Dispa
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend inline fun > ReceiveChannel.filterIndexedTo(destination: C, predicate: (index: Int, E) -> Boolean): C {
consumeEachIndexed { (index, element) ->
@@ -807,8 +805,8 @@ public suspend inline fun > ReceiveChannel.fil
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend inline fun > ReceiveChannel.filterIndexedTo(destination: C, predicate: (index: Int, E) -> Boolean): C {
consumeEachIndexed { (index, element) ->
@@ -827,8 +825,8 @@ public suspend inline fun > ReceiveChannel.filterIndexe
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public fun ReceiveChannel.filterNot(context: CoroutineContext = Dispatchers.Unconfined, predicate: suspend (E) -> Boolean): ReceiveChannel =
filter(context) { !predicate(it) }
@@ -843,8 +841,8 @@ public fun ReceiveChannel.filterNot(context: CoroutineContext = Dispatche
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
@Suppress("UNCHECKED_CAST")
public fun ReceiveChannel.filterNotNull(): ReceiveChannel =
@@ -860,8 +858,8 @@ public fun ReceiveChannel.filterNotNull(): ReceiveChannel =
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend fun > ReceiveChannel.filterNotNullTo(destination: C): C {
consumeEach {
@@ -880,8 +878,8 @@ public suspend fun > ReceiveChannel.fil
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend fun > ReceiveChannel.filterNotNullTo(destination: C): C {
consumeEach {
@@ -900,8 +898,8 @@ public suspend fun > ReceiveChannel.filterNotNul
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend inline fun > ReceiveChannel.filterNotTo(destination: C, predicate: (E) -> Boolean): C {
consumeEach {
@@ -920,8 +918,8 @@ public suspend inline fun > ReceiveChannel.fil
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend inline fun > ReceiveChannel.filterNotTo(destination: C, predicate: (E) -> Boolean): C {
consumeEach {
@@ -940,8 +938,8 @@ public suspend inline fun > ReceiveChannel.filterNotTo(
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend inline fun > ReceiveChannel.filterTo(destination: C, predicate: (E) -> Boolean): C {
consumeEach {
@@ -960,8 +958,8 @@ public suspend inline fun > ReceiveChannel.fil
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend inline fun > ReceiveChannel.filterTo(destination: C, predicate: (E) -> Boolean): C {
consumeEach {
@@ -980,8 +978,8 @@ public suspend inline fun > ReceiveChannel.filterTo(des
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public fun ReceiveChannel.take(n: Int, context: CoroutineContext = Dispatchers.Unconfined): ReceiveChannel =
GlobalScope.produce(context, onCompletion = consumes()) {
@@ -1006,8 +1004,8 @@ public fun ReceiveChannel.take(n: Int, context: CoroutineContext = Dispat
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public fun ReceiveChannel.takeWhile(context: CoroutineContext = Dispatchers.Unconfined, predicate: suspend (E) -> Boolean): ReceiveChannel =
GlobalScope.produce(context, onCompletion = consumes()) {
@@ -1032,8 +1030,8 @@ public fun ReceiveChannel.takeWhile(context: CoroutineContext = Dispatche
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend inline fun ReceiveChannel.associate(transform: (E) -> Pair): Map =
associateTo(LinkedHashMap(), transform)
@@ -1053,8 +1051,8 @@ public suspend inline fun ReceiveChannel.associate(transform: (E) -
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend inline fun ReceiveChannel.associateBy(keySelector: (E) -> K): Map =
associateByTo(LinkedHashMap(), keySelector)
@@ -1073,8 +1071,8 @@ public suspend inline fun ReceiveChannel.associateBy(keySelector: (E)
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend inline fun ReceiveChannel.associateBy(keySelector: (E) -> K, valueTransform: (E) -> V): Map =
associateByTo(LinkedHashMap(), keySelector, valueTransform)
@@ -1093,8 +1091,8 @@ public suspend inline fun ReceiveChannel.associateBy(keySelector: (
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend inline fun > ReceiveChannel.associateByTo(destination: M, keySelector: (E) -> K): M {
consumeEach {
@@ -1117,8 +1115,8 @@ public suspend inline fun > ReceiveChannel.a
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend inline fun > ReceiveChannel.associateByTo(destination: M, keySelector: (E) -> K, valueTransform: (E) -> V): M {
consumeEach {
@@ -1140,8 +1138,8 @@ public suspend inline fun > ReceiveChannel> ReceiveChannel.associateTo(destination: M, transform: (E) -> Pair): M {
consumeEach {
@@ -1161,8 +1159,8 @@ public suspend inline fun > ReceiveChannel> ReceiveChannel.toChannel(destination: C): C {
consumeEach {
@@ -1181,8 +1179,8 @@ public suspend fun > ReceiveChannel.toChannel(destinati
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend fun > ReceiveChannel.toCollection(destination: C): C {
consumeEach {
@@ -1210,8 +1208,8 @@ public suspend fun ReceiveChannel.toList(): List =
* See [issue #254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
*/
@Deprecated(
- message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4",
- level = DeprecationLevel.WARNING
+ message = "Channel operators are deprecated in favour of Flow and will be removed in 1.4.x",
+ level = DeprecationLevel.ERROR
)
public suspend fun ReceiveChannel>.toMap(): Map =
toMap(LinkedHashMap())
@@ -1226,8 +1224,8 @@ public suspend fun ReceiveChannel>.toMap(): Map