Hi Val.

Yes!  Not all software races are critical.  I would say that this is an example 
of a non-critical one, depending on your needs (is 1us resolution good 
enough?).  The only software method of synchronizing events absolutely would 
probably would require locking the CPU's interrupts.  :)

Digital designers generally classify races as either critical (bad) or 
non-critical (not bad).  Indeed, some non-critical races are necessary else 
things wouldn't work.  :)

John

    John Souvestre - New Orleans LA


-----Original Message-----
From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On 
Behalf Of Val
Sent: 2017 January 25, Wed 16:40
To: golang-nuts
Subject: Re: [go-nuts] Re: Priority cases in select?

Thank you John and Paul, I find this debate really interesting.

> hi was clearly written before lo
This is not my understanding of the memory model : because the channels are 
buffered, I can't really infer the "happens-before" relationship between the 
reading event of the channels.
And even if the relationship holds locally in the writing side, it has no 
strong implication on what other goroutines can see. I would say the hi and lo 
communications happen concurrently, hence the "wrong" results once in a while.

Val

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