memory fences/barriers in C++: does boost or other libraries have them?
问题 I am reading these days about memory fences and barriers as a way to synchronize multithreaded code and avoid code reordering. I usually develop in C++ under Linux OS and I use boost libs massively but I am not able to find any class related to it. Do you know if memory barrier of fences are present in boost or if there is a way to achieve the same concept? If not what good library can I have a look to? 回答1: There are no low-level memory barriers in boost yet, but there is a proposed boost