File tree 1 file changed +7
-4
lines changed
kotlinx-coroutines-core/common/src/channels
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -23,12 +23,15 @@ import kotlin.jvm.*
23
23
*/
24
24
public interface SendChannel <in E > {
25
25
/* *
26
- * Returns `true` if this channel was closed by an invocation of [close]. This means that
27
- * calling [send] will result in an exception.
26
+ * Returns `true` if this channel was closed by an invocation of [close] or its receiving side was [cancelled][ReceiveChannel.cancel].
27
+ * This means that calling [send] will result in an exception.
28
28
*
29
- * **Note: This is an experimental api.** This property may change its semantics and/or name in the future.
29
+ * Note that if this property returns `false`, it does not guarantee that consecutive call [send] will succeed, as the
30
+ * channel can be concurrently closed right after the check. For such scenarios, it is recommended to use [trySend] instead.
31
+ *
32
+ * @see SendChannel.close
33
+ * @see ReceiveChannel.cancel
30
34
*/
31
- @ExperimentalCoroutinesApi
32
35
public val isClosedForSend: Boolean
33
36
34
37
/* *
You can’t perform that action at this time.
0 commit comments