Commit 80912052 authored by Craig Silverstein's avatar Craig Silverstein

Clarify thread-safety comment for FlagSaver.

Tested:
blaze test base:commandlineflags_unittest

R=csilvers
DELTA=4  (3 added, 0 deleted, 1 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=3791


git-svn-id: https://gflags.googlecode.com/svn/trunk@71 6586e3c6-dcc4-952a-343f-ff74eb82781d
parent be2da58d
......@@ -267,7 +267,10 @@ extern std::string SetCommandLineOptionWithMode(const char* name, const char* va
// usage example above, the compiler would complain that it's an
// unused variable.
//
// This class is thread-safe.
// This class is thread-safe. However, its destructor writes to
// exactly the set of flags that have changed value during its
// lifetime, so concurrent _direct_ access to those flags
// (i.e. FLAGS_foo instead of {Get,Set}CommandLineOption()) is unsafe.
class GFLAGS_DLL_DECL FlagSaver {
public:
......
......@@ -271,7 +271,10 @@ extern GFLAGS_DLL_DECL std::string SetCommandLineOptionWithMode(const char* name
// usage example above, the compiler would complain that it's an
// unused variable.
//
// This class is thread-safe.
// This class is thread-safe. However, its destructor writes to
// exactly the set of flags that have changed value during its
// lifetime, so concurrent _direct_ access to those flags
// (i.e. FLAGS_foo instead of {Get,Set}CommandLineOption()) is unsafe.
class GFLAGS_DLL_DECL FlagSaver {
public:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment