This code works though, it's not possible to send the dc before the rc is
read and so the done counter cannot reach 2 before both 0s have been
written. I made a playground that runs it 100k times to
demonstrate. https://play.golang.org/p/DKltfzDI95L
On Tuesday, December 18, 2018 at 8:35:26 AM U
I don’t think that code is correct. You are using buffered channels do it could
read the done values and exit before reading any results technically since when
data is available on both it is random which is read.
> On Dec 18, 2018, at 8:32 AM, john_halder...@moma.org wrote:
>
> This code work
You are both correct, I somehow missed that they were buffered. Thanks for
correcting me. On a side note, is there a reason not to use a wait all?
Thanks.
On Tue, Dec 18, 2018 at 10:05 AM Robert Engels
wrote:
> I don’t think that code is correct. You are using buffered channels do it
> could rea