Thank you
I reread the document and still not quite sure if the function is safe to 
be called concurrently.
So I try the race detector which is not outputting any report. (Mean safe I 
supposed.)
Finally, I look at the source code which I found sync/atomic usage for 
counter manipulation so I sure about it.
Thank you both for the confirmation.

I have another question regarding the usage of race detector.
I don't know how it works so I wonder if it gives deterministic output or 
not?
Do I need to try it multiple times in order to make sure?

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