mirror of
https://github.com/CnTransGroup/EffectiveModernCppChinese.git
synced 2024-10-28 04:00:13 +08:00
Update item16.md
This commit is contained in:
parent
28f7ba450d
commit
17d196d1cd
@ -191,5 +191,5 @@ private:
|
||||
|
||||
**请记住:**
|
||||
|
||||
+ 确保`const`成员函数线程安全,除非你**确定**它们永远不会在并发区(*concurrent context*)中使用。
|
||||
+ 确保`const`成员函数线程安全,除非你**确定**它们永远不会在并发上下文(*concurrent context*)中使用。
|
||||
+ 使用`std::atomic`变量可能比互斥量提供更好的性能,但是它只适合操作单个变量或内存位置。
|
||||
|
Loading…
Reference in New Issue
Block a user