3 ms·
Although I did understand memory barriers early while playing with lock free concurrency, I didn't really grok them until much later. I had initially a very har
by gpderetta 9y ago
Although I did understand memory barriers early while playing with lock free concurrency, I didn't really grok them until much later. I had initially a very hard time, while thinking in term of reordering, in figuring out which barrier goes where.
But the C++ memory model (and the acquire/release consistency model in general), which does away with explicit barriers but attach synchronization behaviour to store->load edges [1], instead clicked almost immediately and in retrospect made it easier for me to describe an algorithm in the more informal reordering based model.
[1] barriers are available, but are discouraged and are still defined in term of acquire/release and sequential consistency.