C++ Details of Asymmetric Fences(nekrozqliphort.github.io)
48 points by anon_farmer 4 days ago | 4 comments
ot 2 hours ago
This is a great article but it goes into a lot of detail that can be intimidating at first.

For me, the reading that made asymmetric fences "click" is this: https://pvk.ca/Blog/2019/01/09/preemption-is-gc-for-memory-r...

It might be easier to read that first, as it also goes into practical applications, and then this one.

fschutze 11 minutes ago
Thanks, this is very useful. Reading it I was wondering how applications typically exploit the asymmetric fence, I hope the article you linked help in that regard.
KenoFischer 35 minutes ago
I also just added these to Julia for 1.14 (https://github.com/JuliaLang/julia/pull/60311).
jeffbee 1 hour ago
I can't help myself digging into the referenced source code. The membarrier syscall can fail to allocate, returning ENOMEM. The way Folly calls it, the program would abort. Which I guess is a fair strategy but it's good to know when your synchronization primitive is actually SynchronizeOrCrash.
nttylock 4 hours ago
[flagged]