3 ms·
People who, like me, were taught concurrency at a time when Java had a proper memory model but C and C++ did not (i.e. prior to 2011) should go read the docs fo
by hsivonen 9y ago
People who, like me, were taught concurrency at a time when Java had a proper memory model but C and C++ did not (i.e. prior to 2011) should go read the docs for C11 memory orders (used also by Rust and C++).
Writing lockless Rust/C/C++ leads to a bad time (especially on non-x86 architectures) if one believes what's true about concurrency in Java to be generally true on computers.
- pjmlp 9y agoThere is a guy in the C++ community known for writing lock-less data structures (Tony Van Eerd), if I recall correctly one of his advices is to think multiple times before ever considering writing such kind of code.
- gpderetta 9y agoTechnically C11 uses the C++11 memory model. It was originally developed as part of the C++ standardization effort.