Have you checked that your code is free of data races? The total == 0 condition
would be my guess for a potential data race.
--
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
On Thu, Dec 8, 2016 at 7:44 PM, Freeman Feng wrote:
>
> I found that if I use timeout mixed with another chan which is heavily
> communicated with other goroutines, it could lead to dead lock or something
> inside select
>
> Here is the codes:
>
> for {
> select {
> case x
Hello,
I found that if I use timeout mixed with another chan which is heavily
communicated with other goroutines, it could lead to dead lock or something
inside select
Here is the codes:
for {
select {
case x := <-ch:
// handling business logic begin (about 38+ message pushed to this chan at