Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CombineChannels ¶
func CombineChannels[T any](channels []<-chan T) <-chan T
CombineChannels take a slice of non-nil channels as input and returns a chan that relays the values received across all the input channels. The values transmitted by the returned channel may be received out of order if they are transmitted by different input channels but will retain the order if they are transmitted by the same input channel. The returned channel is closed automatically after the last channel in the input channel list is closed
func RunWithAsyncResult ¶
func RunWithAsyncResult[T any](fn func(ch chan<- T)) <-chan T
RunWithAsyncResult runs the passed function asynchronously and returns the results in a channel. The function may choose to publish as many values using the write-only channel in the callback. The write-only channel is closed automatically after the callback function finishes execution. The channel returned by the function is closed automatically after the last value has been read from the channel
Types ¶
This section is empty.