BufferType
public enum BufferType : Equatable
CoChannel
buffer type.
-
This channel does not have any buffer.
An element is transferred from the sender to the receiver only when send and receive invocations meet in time, so
awaitSend(_:)
suspends until invokes receive, andawaitReceive()
suspends until invokes send.Declaration
Swift
case none
-
This channel have a buffer with the specified capacity.
awaitSend(_:)
suspends only when the buffer is full, andawaitReceive()
suspends only when the buffer is empty.Declaration
Swift
case buffered(capacity: Int)
-
This channel has a buffer with unlimited capacity.
awaitSend(_:)
to this channel never suspends, and offer always returns true.awaitReceive()
suspends only when the buffer is empty.Declaration
Swift
case unlimited
-
This channel buffers at most one element and offer invocations, so that the receiver always gets the last element sent.
Only the last sent element is received, while previously sent elements are lost.
awaitSend(_:)
to this channel never suspends, and offer always returns true.awaitReceive()
suspends only when the buffer is empty.Declaration
Swift
case conflated