and mine is also incorrect. now it handles your test but not intended 
operation. :)

On Sunday, 5 May 2019 12:25:29 UTC+2, Louki Sumirniy wrote:
>
> With your (imho incorrect) code, the following small modification defers 
> starting the channel until an add has been called and passes the test:
>
> https://play.golang.org/p/sEFcwcPMdHF
>
> On Sunday, 5 May 2019 11:54:40 UTC+2, Jan Mercl wrote:
>>
>> On Sun, May 5, 2019 at 11:46 AM Louki Sumirniy 
>> <louki.sumi...@gmail.com> wrote: 
>>
>> > That would mean your code, which breaks this code, also breaks the rule 
>> about never starting a goroutine without having a way to stop it. My code 
>> only fails when the caller is also failing. 
>>
>> My code does not even contain a go statement. How it can break a rule 
>> about starting goroutines? 
>>
>> By "my code" I mean lines 62 to 66 here 
>> https://play.golang.org/p/v3OSWxTpTQY, the rest is your code. 
>>
>

-- 
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 golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to