https://peter.bourgon.org/go-for-industrial-programming/
future := make(chan int, 1)
go func() { future <- process() }()
result := <- future
c := make(chan int, 1)
go func { c <- process() }() // async
c := <-c // await
// Scatter
c := make(chan result, 10)
for i := 0; i < cap(c); i++ {
go func() {
val, err := process()
c <- result{val, err}
}()
}
// Gather
var total int
for i := 0; i < cap(c); i++ {
res := <-c
if res.err != nil {
total += res.val
}
}