On Wed, Oct 24, 2018 at 11:17 AM Sathish VJ wrote:
>
> Thank you. Would you have an explanation for why it works so differently
> from using default?
The codepath that causes the deadlock is :
- main reads from c
- f() runs select, quit is not writable, so selects default, which
starts waitin
Thank you. Would you have an explanation for why it works so differently
from using default?
On Wednesday, 24 October 2018 22:44:26 UTC+5:30, Burak Serdar wrote:
>
> You can do this instead:
>
> https://play.golang.org/p/avMIyYlwxbF
> On Wed, Oct 24, 2018 at 11:05 AM Sathish VJ > wrote:
> >
You can do this instead:
https://play.golang.org/p/avMIyYlwxbF
On Wed, Oct 24, 2018 at 11:05 AM Sathish VJ wrote:
>
> This is a program where the receiver is asking the sender to close after
> receiving 1 value. Using default for the sending (line 34) causes the code
> to deadlock while even a
This is a program where the receiver is asking the sender to close after
receiving 1 value. Using default for the sending (line 34) causes the code
to deadlock while even a timeout of a nanosecond causes it to be ok.
I don't want to time the sending though. Is there a better option to
sequen