```
// c is buffered channel
select {
case c <- result:
default:
// full, drop old one
<-c
c <- result
}
```
I have a code like this, but there may be a race condition in the default
case. I enconter a
deadlock that the goroutine block on 'c<'.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/12ad584b-8713-4acd-a02b-22fba0ee0bfen%40googlegroups.com.