mirror of
https://github.com/cpp-best-practices/cppbestpractices.git
synced 2025-12-17 11:14:35 +03:00
Update 07-Considering_Threadability.md
This commit is contained in:
@@ -15,4 +15,6 @@ For member variables it is good practice to use mutex and mutable together. This
|
||||
* A mutable member variable is presumed to be a shared variable so it should be synchronized with a mutex (or made atomic)
|
||||
* If a member variable is itself a mutex, it should be mutable. This is required to use it inside a const member function.
|
||||
|
||||
For more information see the following article from Herb Sutter: http://herbsutter.com/2013/05/24/gotw-6a-const-correctness-part-1-3/
|
||||
For more information see the following article from Herb Sutter: http://herbsutter.com/2013/05/24/gotw-6a-const-correctness-part-1-3/
|
||||
|
||||
See also [related safety discussion](04-Considering_Safety.md#consider-return-by-value-for-mutable-data-const--for-immutable) about `const &` return values
|
||||
|
||||
Reference in New Issue
Block a user