Re: [go-nuts] Why doesn't this select statement timeout?

2018-05-25 Thread gopher . nutter
That is an excellent example. Thanks! On Thursday, May 24, 2018 at 8:26:36 AM UTC-7, alex@gmail.com wrote: > > No, not the entire case statements, only the statements on the right of > the "<-" > > btw if you run it out of the playground (which makes concurrency more > deterministic) > You w

Re: [go-nuts] Why doesn't this select statement timeout?

2018-05-24 Thread gopher . nutter
Thanks for the reply. So you're saying that all case statements are evaluated first before a choice is made. Which means that the full request/response must complete even if the timeout case finishes first. If I swap the cases, now I consistently get a `timeout`. All cases are run to completio

[go-nuts] Why doesn't this select statement timeout?

2018-05-21 Thread gopher . nutter
The following setup uses a select statement to either wait for a response error or timeout after a given duration. The httptest.Server is setup to force the timeout by sleeping (1 sec) for greater than the timeout (1 millisec). But the timeout case isn't being hit at all, why? what is wrong wit