2018年3月18日
摘要: 先引入cppreference中的描述: Atomic operations tagged memory_order_seq_cst not only order memory the same way as release/acquire ordering (everything that hap 阅读全文
posted @ 2018-03-18 17:42 月落无影 阅读(624) 评论(0) 推荐(0) 编辑
摘要: C++ Concurrent in Action(英文版)书上(No.52-No.53)写的hierarchical_mutex函数,只适合结合std::lock_guard使用,直接使用如果不考虑顺序,可能会出现问题。 参看hierarchical_mutex类的代码: 测试代码: 正确时,输出值 阅读全文
posted @ 2018-03-18 16:09 月落无影 阅读(796) 评论(2) 推荐(0) 编辑