Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Select ¶
func Select[T any](add <-chan <-chan T) (closed <-chan []<-chan T)
Select implements the dynamic supervision of a pool of channels that are expected to eventually close. You add channels to the supervised pool by sending them on the provided add channel, and channels that close while supervised are emitted on the returned closed channel.
This function spawns a new goroutine to perform the supervision. This goroutine will shut down when the provided add channel is closed and all supervised channels close. The returned closed channel will close when the goroutine exits.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.