On channel closed

If channel.isClosedForSend is true, offer() will throw an exception of the type ClosedSendChannelException, as the following for example:

val channel = Channel<Int>(1)
channel.close()
channel.offer(10)

This will crash, indicating that the channel was closed:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.98.208