commentary improved
This commit is contained in:
parent
9696f7d42b
commit
6d79f07f5a
3
utils.go
3
utils.go
@ -12,7 +12,8 @@ func determineBufferSize[T any](channels []<-chan T) int {
|
|||||||
return bufSize / len(channels)
|
return bufSize / len(channels)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Flush consumes all values and discards them immediately
|
// Flush consumes all values and discards them immediately.
|
||||||
|
// It blocks until all sources are closed
|
||||||
func Flush[T any](sources ...<-chan T) {
|
func Flush[T any](sources ...<-chan T) {
|
||||||
for range Merge(sources...) {
|
for range Merge(sources...) {
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user