On Mon, Jun 15, 2020 at 10:30 AM Leo Baltus <leo.bal...@npo.nl> wrote: > > from gopl chapter 9.4 'Memory synchronisation’ > > Synchronization primitives like channel communications and mutex operations > cause the processor to flush out and commit all its accumulated writes so > that the effects of goroutine execution up to that point are guaranteed to be > visible to goroutines running on other processors. > > I would like to better understand how this works. What is it that makes this > ‘flush out’ to happen? Is this a system call?
It is usually done with a memory barrier: https://en.wikipedia.org/wiki/Memory_barrier > > — > Leo > > > > -- > 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/F663D146-9F4C-48BB-918A-E58D554B9B18%40npo.nl. -- 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/CAMV2RqoU8c9djuG7GzxwF9HhY7DGyQA6LsSBWxv7ikQy53TC5A%40mail.gmail.com.