Greetings,

I am trying to understand the exact mechanics of memory write ordering from
within the same goroutine. I wrote a self-contained runnable example with
the question inlined here: https://go.dev/play/p/ZXMg_Qq3ygF and am copying
its header here:

// Below is a complete example, with the question starting on line 38:
// how do I ensure that a *separate Linux OS process* observing `IPCfile`
// (either via pread() or mmap()) can *NEVER* observe W2 before W1.
// The only permissible states are:
// 1. no changes visible
// 2. only W1 is visible
// 3. both W1 and W2 are visible

I did read through https://go.dev/ref/mem and
https://github.com/golang/go/discussions/47141 + links, but could not find
a definitive answer to my specific use-case.

Would really appreciate any help getting to the bottom of this!

-- 
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/CAMrvTSKXb5JQMR9PcCXwYhcT4rq8O_5hiTHrOChk6sUeOrbagw%40mail.gmail.com.

Reply via email to