I have read those comments. However, I still can't understand why it is 
safe for chansend to NOT use atomic.Load for c.closed when chanrecv does 
use it. 

It is also my understanding that writes within a locked region that are 
read in some fast path without holding the lock need to be atomic writes. 
And the write to c.closed in closechan is NOT atomic.

-- 
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