Or, if you have something else you’d rather be doing while waiting…
https://play.golang.org/p/rhwEpWMhqF
John
John Souvestre - New Orleans LA
From: John Souvestre [mailto:[email protected]]
Sent: 2016 September 13, Tue 16:21
To: '[email protected]'
Subject: RE: [go-nuts] Having difficulty testing this "cleanly"
OK. Check this one out. https://play.golang.org/p/kO_96oykG1
John
John Souvestre - New Orleans LA
From: Evan Digby [mailto:[email protected]]
Sent: 2016 September 13, Tue 16:06
To: John Souvestre; [email protected]
Subject: Re: [go-nuts] Having difficulty testing this "cleanly"
Hi John,
Thank you!
The h.closed channel, if checked properly (after the RLock), prevents the race
condition that Augusto pointed out in his post a few back.
I fixed my implementation here: https://play.golang.org/p/QTkSJAOPtE
Thanks again,
Evan
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.