Skip to content

Commit 62e6275

Browse files
committed
~documentation cleanup
1 parent 7d7eba6 commit 62e6275

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

kotlinx-coroutines-core/api/kotlinx-coroutines-core.api

-1
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,6 @@ public abstract class kotlinx/coroutines/flow/internal/ChannelFlow : kotlinx/cor
987987
public fun collect (Lkotlinx/coroutines/flow/FlowCollector;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
988988
protected abstract fun collectTo (Lkotlinx/coroutines/channels/ProducerScope;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
989989
protected abstract fun create (Lkotlin/coroutines/CoroutineContext;I)Lkotlinx/coroutines/flow/internal/ChannelFlow;
990-
protected final fun getProduceCapacity ()I
991990
public fun produceImpl (Lkotlinx/coroutines/CoroutineScope;)Lkotlinx/coroutines/channels/ReceiveChannel;
992991
public fun toString ()Ljava/lang/String;
993992
public final fun update (Lkotlin/coroutines/CoroutineContext;I)Lkotlinx/coroutines/flow/internal/ChannelFlow;

kotlinx-coroutines-core/common/src/flow/Builders.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,8 @@ public fun <T> channelFlow(@BuilderInference block: suspend ProducerScope<T>.()
298298
* }
299299
* api.register(callback)
300300
* /*
301-
* * Suspends until either 'onCompleted' from the callback is invoked
302-
* * or flow collector is cancelled (e.g. by 'take(1)' or because a collector's activity was destroyed).
301+
* * Suspends until either 'onCompleted'/'onApiError' from the callback is invoked
302+
* * or flow collector is cancelled (e.g. by 'take(1)' or because a collector's coroutine was cancelled).
303303
* * In both cases, callback will be properly unregistered.
304304
* */
305305
* awaitClose { api.unregister(callback) }
@@ -342,8 +342,8 @@ private class CallbackFlowBuilder<T>(
342342
throw IllegalStateException(
343343
"""
344344
'awaitClose { yourCallbackOrListener.cancel() }' should be used in the end of callbackFlow block.
345-
Otherwise, a callback/listener may leak in case of cancellation external cancellation (e.g. by 'take(1)' or destroyed activity).
346-
See callbackFlow API documentation for the details.
345+
Otherwise, a callback/listener may leak in case of external cancellation.
346+
See callbackFlow API documentation for the details.
347347
""".trimIndent()
348348
)
349349
}

kotlinx-coroutines-core/common/src/flow/internal/ChannelFlow.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public abstract class ChannelFlow<T>(
3232
internal val collectToFun: suspend (ProducerScope<T>) -> Unit
3333
get() = { collectTo(it) }
3434

35-
protected val produceCapacity: Int
35+
private val produceCapacity: Int
3636
get() = if (capacity == Channel.OPTIONAL_CHANNEL) Channel.BUFFERED else capacity
3737

3838
public fun update(

0 commit comments

Comments
 (0)