File tree 3 files changed +5
-6
lines changed
3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -987,7 +987,6 @@ public abstract class kotlinx/coroutines/flow/internal/ChannelFlow : kotlinx/cor
987
987
public fun collect (Lkotlinx/coroutines/flow/FlowCollector;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
988
988
protected abstract fun collectTo (Lkotlinx/coroutines/channels/ProducerScope;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
989
989
protected abstract fun create (Lkotlin/coroutines/CoroutineContext;I)Lkotlinx/coroutines/flow/internal/ChannelFlow;
990
- protected final fun getProduceCapacity ()I
991
990
public fun produceImpl (Lkotlinx/coroutines/CoroutineScope;)Lkotlinx/coroutines/channels/ReceiveChannel;
992
991
public fun toString ()Ljava/lang/String;
993
992
public final fun update (Lkotlin/coroutines/CoroutineContext;I)Lkotlinx/coroutines/flow/internal/ChannelFlow;
Original file line number Diff line number Diff line change @@ -298,8 +298,8 @@ public fun <T> channelFlow(@BuilderInference block: suspend ProducerScope<T>.()
298
298
* }
299
299
* api.register(callback)
300
300
* /*
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 ).
303
303
* * In both cases, callback will be properly unregistered.
304
304
* */
305
305
* awaitClose { api.unregister(callback) }
@@ -342,8 +342,8 @@ private class CallbackFlowBuilder<T>(
342
342
throw IllegalStateException (
343
343
"""
344
344
'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.
347
347
""" .trimIndent()
348
348
)
349
349
}
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ public abstract class ChannelFlow<T>(
32
32
internal val collectToFun: suspend (ProducerScope <T >) -> Unit
33
33
get() = { collectTo(it) }
34
34
35
- protected val produceCapacity: Int
35
+ private val produceCapacity: Int
36
36
get() = if (capacity == Channel .OPTIONAL_CHANNEL ) Channel .BUFFERED else capacity
37
37
38
38
public fun update (
You can’t perform that action at this time.
0 commit comments