after calling canceled, but before sending on bus, you can close the channels.
Put i in one select:
select {
case <-done:
default:
select {
case <-done:
case bus<-r:
}
}
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe
Hi All,
I am stumped by this one, so I am hoping that someone on the list can
spot the bug in this piece of code.
The code is here:
https://play.golang.org/p/c3356cVtWa
The code occasionally (roughly 1 in 10 to 1 in 5 on my hardware) fails
with the data race shown below.
The code uses a