On Fri, Nov 29, 2019 at 7:21 PM Liam <networkimp...@gmail.com> wrote: > > Does atomic.AddInt32(&x, 1) always yield unique values for concurrent callers? > > I'm guessing not, because (I think) I'm seeing that two callers get x+2, > neither gets x+1.
That should not happen, afaik. Do you have code you can share? > > Is there a way to generate unique values with pkg atomic, or is a mutex > required? > > -- > 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/b8cd30f3-effe-4d1d-ac5b-4bb29bbd9a10%40googlegroups.com. -- 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/CAMV2RqrE17WEUt3p-nwWcMUyrvLa-LoLuYgfRzr87MyOh%2BitSg%40mail.gmail.com.