Hi Dave.

 

Oops!  I read it as "pad".  My bad.

 

John

    John Souvestre - New Orleans LA

 

From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On 
Behalf Of Dave Cheney
Sent: 2017 October 22, Sun 22:27
To: golang-nuts
Subject: Re: [go-nuts] will the following code always print two 1?

 

Thanks Keith. I fat fingered my response and it probably wasn’t clear that I 
was talking about the requirement to pair atomic stores and loads. I agree that 
if atomic store and loads are used for both variables, the program will print a 
1

On Monday, 23 October 2017 14:01:17 UTC+11, John Souvestre wrote:

Interesting.  I hadn't heard this.  Do you happen to recall where you ran 
across it? 

 

Ref: https://go-review.googlesource.com/c/go/+/65210

 

Also:  <https://github.com/golang/go/issues/5045> 
https://github.com/golang/go/issues/5045

 


I did a fast (not comprehensive) look at about 10 files in Go\src\... in which 
I found "atomic.StoreUint".  None of them seemed to use any padding. 

 

Not sure where you're going with this, I tried to write `pair atomic` in my 
previous message but it came out as `paid atomic`, sorry for the confusion.

 


John 

    John Souvestre - New Orleans LA 


-----Original Message----- 
From: golan...@googlegroups.com <javascript:>  
[mailto:golan...@googlegroups.com <javascript:> ] On Behalf Of Dave Cheney 
Sent: 2017 October 22, Sun 17:07 
To: golang-nuts 
Subject: RE: [go-nuts] will the following code always print two 1? 

If that we�re the case then you wouldn�t need to paid an atomic.Store with an 
atomic.Load. But as I understand it, you do. 

-- 
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...@googlegroups.com <javascript:> . 
For more options, visit https://groups.google.com/d/optout. 

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

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