isClosedForSend

Returns true if this channel was closed by an invocation of close or its receiving side was cancelled. This means that calling send will result in an exception.

Note that if this property returns false, it does not guarantee that consecutive call to send will succeed, as the channel can be concurrently closed right after the check. For such scenarios, it is recommended to use trySend instead.

See also