Documentation ¶
Overview ¶
Package register implements a write-once register.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WriteOnce ¶
type WriteOnce[T any] struct { // contains filtered or unexported fields }
WriteOnce is a concurrent write-once register.
func (*WriteOnce[T]) Read ¶
func (w *WriteOnce[T]) Read() T
Read returns the value of the register, blocking until it is written.
Click to show internal directories.
Click to hide internal directories.