如果临界区中唯一的内容是对一个变量的操作,那么最简单的同步方法是使用 std::atomic<> 及其相关的算术函数。

Last modified: Thursday, 30 January 2025, 5:45 PM