Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LastChan ¶
type LastChan struct {
// contains filtered or unexported fields
}
func NewLastChan ¶
func NewLastChan() *LastChan
type Latch ¶
type Latch[T any] struct { // contains filtered or unexported fields }
Latch is a thread-safe value holder that can be set once and read many times. Once Set is called, all future Wait calls will immediately return the set value.
func (*Latch[T]) Chan ¶
func (l *Latch[T]) Chan() <-chan struct{}
Chan returns a channel that will be closed when the value is set. Useful for select statements.
Click to show internal directories.
Click to hide internal directories.