On Sun, May 26, 2019 at 8:05 PM Sotirios Mantziaris
<smantzia...@gmail.com> wrote:

> From what i understand you propose to create a new object and switch out the 
> old one with the new one using the atomic package of go.

That cannot work. String is a multi word value. There's nothing in the
atomic package that can update a multi word value. However, a pointer
to anything _can_ be updated atomically.

You cannot "safely" cheat on the data race. As said before, you must
synchronize (the readers vs writers). There's no other option.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAA40n-XTGeeN%3D%3D7R7QMc22KMs_iTWgO4Z%3DWfqoKaFkftenY-7Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to