Re: [go-nuts] Writing data without synchronization

2020-04-14 Thread Slawomir Pryczek
Thanks for very insightful posts. That's actually what i was interested in, as i was wondering if x86 is so advanced to invalidate caches on its own, or it's taken care by software/compiler or if that's just pure coincidence that this code actually works :) Actually as i'm doing persistent conn

Re: [go-nuts] Writing data without synchronization

2020-04-14 Thread Ian Lance Taylor
On Tue, Apr 14, 2020 at 4:39 AM Slawomir Pryczek wrote: > > Hi Guys, was wondering about some things related to multithread code. > > 1. If data that is accessed or changed - it needs to go into CPU cache first, > and AFAIK to caches whole memory block not just this single area of memory on > wh

[go-nuts] Writing data without synchronization

2020-04-14 Thread Slawomir Pryczek
Hi Guys, was wondering about some things related to multithread code. 1. If data that is accessed or changed - it needs to go into CPU cache first, and AFAIK to caches whole memory block not just this single area of memory on which we're operating. When we're doing writes without synchronizatio