From d85b16c9979b3d4d6c4f5778fd1a66e42de03dab Mon Sep 17 00:00:00 2001 From: Vsevolod Tolstopyatov Date: Mon, 7 Dec 2020 18:14:26 +0300 Subject: [PATCH 1/2] Update SharedFlow documentation --- kotlinx-coroutines-core/common/src/flow/SharedFlow.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kotlinx-coroutines-core/common/src/flow/SharedFlow.kt b/kotlinx-coroutines-core/common/src/flow/SharedFlow.kt index 75f9e710f7..cf4a75633b 100644 --- a/kotlinx-coroutines-core/common/src/flow/SharedFlow.kt +++ b/kotlinx-coroutines-core/common/src/flow/SharedFlow.kt @@ -33,7 +33,7 @@ import kotlin.native.concurrent.* * * [SharedFlow] is useful for broadcasting events that happen inside an application to subscribers that can come and go. * For example, the following class encapsulates an event bus that distributes events to all subscribers - * in a _rendezvous_ manner, suspending until all subscribers process each event: + * in a _rendezvous_ manner, suspending until all subscribers receive emitted event: * * ``` * class EventBus { @@ -148,8 +148,8 @@ public interface SharedFlow : Flow { */ public interface MutableSharedFlow : SharedFlow, FlowCollector { /** - * Emits a [value] to this shared flow, suspending on buffer overflow if the shared flow was created - * with the default [BufferOverflow.SUSPEND] strategy. + * Emits a [value] to this shared flow, suspending on buffer overflow until all subscribers receive the value + * if the shared flow was created with the default [BufferOverflow.SUSPEND] strategy. * * See [tryEmit] for a non-suspending variant of this function. * From 548558e6344656346a99556f793ba14bb700bf17 Mon Sep 17 00:00:00 2001 From: Vsevolod Tolstopyatov Date: Mon, 1 Mar 2021 19:16:09 +0300 Subject: [PATCH 2/2] ~revert misleading line --- kotlinx-coroutines-core/common/src/flow/SharedFlow.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kotlinx-coroutines-core/common/src/flow/SharedFlow.kt b/kotlinx-coroutines-core/common/src/flow/SharedFlow.kt index cf4a75633b..ac9e66b0d5 100644 --- a/kotlinx-coroutines-core/common/src/flow/SharedFlow.kt +++ b/kotlinx-coroutines-core/common/src/flow/SharedFlow.kt @@ -1,5 +1,5 @@ /* - * Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + * Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ package kotlinx.coroutines.flow @@ -148,8 +148,8 @@ public interface SharedFlow : Flow { */ public interface MutableSharedFlow : SharedFlow, FlowCollector { /** - * Emits a [value] to this shared flow, suspending on buffer overflow until all subscribers receive the value - * if the shared flow was created with the default [BufferOverflow.SUSPEND] strategy. + * Emits a [value] to this shared flow, suspending on buffer overflow if the shared flow was created + * with the default [BufferOverflow.SUSPEND] strategy. * * See [tryEmit] for a non-suspending variant of this function. *