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 connections i'll just read everything once, on-connect and then keep a copy per thread while doing the synchronization "normally". Basically i'm not into micro-optimizations too much, in production code i see that synchronization of short code leads to starvation that's why i try to avoid it, but yes probably redesigning code would be better than using some "hacks" which can be unsafe. -- 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/686c344a-fe16-4889-b2c8-e7d14d6525ae%40googlegroups.com.