Readonly
capacityReturns how much data the channel has buffered
Readonly
isReturns whether the channel is closed
Readonly
lengthReturns the channel buffer size
Close the channel, after which the channel will not be able to write, all blocked reads and writes are returned, but the value that has been written to the channel is guaranteed to be fully read
Returns false if the channel has been closed, otherwise closes the channel and returns true
Attempt to write a value to the channel
Returns true if the write is successful
ChannelException Writing a value to a closed channel will throw errChannelClosed
value to write
Optional
exception: booleanIf set to true, writing to a closed channel will throw an exception
Writes a value to the channel, blocking if the channel is not writable until the channel is writable or closed
Returns true if the write is successful, false otherwise this is usually because the channel has been closed
ChannelException Writing a value to a closed channel will throw errChannelClosed
value to write
Optional
exception: booleanIf set to true, writing to a closed channel will throw an exception
Create a case for select to write to
ChannelException Writing a value to a closed channel, select will throw errChannelClosed
value to write
Optional
exception: booleanIf set to true, writing to a closed channel will throw an exception
Generated using TypeDoc
a write-only channel