If there's no uncoordinated write and read/write of the same slot, then it's 
race-free.

Only reads does not need coordination.

I'm using a pattern alike: allocate a slice for the results, start the 
goroutines, each writing into it's own slot, then wait all of them to complete, 
and use the result array.
Here the "wait all" is crucial!

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