Documentation ¶
Overview ¶
Package infinity provides an unbounded buffered channel implementation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel[T any] struct { // contains filtered or unexported fields }
Channel represents an unbounded buffered channel for values of type T.
func NewChannel ¶
NewChannel creates a new unbounded buffered channel for values of type T.
func (*Channel[T]) Close ¶
func (ch *Channel[T]) Close()
Close safely closes the input channel, ensuring that it is closed only once. It uses the sync.Once field in the Channel struct to guarantee a single execution.
func (*Channel[T]) In ¶
func (ch *Channel[T]) In() chan<- T
In returns a send-only channel for writing values to the Channel.
Click to show internal directories.
Click to hide internal directories.