diff options
author | Abseil Team <absl-team@google.com> | 2023-08-02 11:40:36 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-08-02 11:41:25 -0700 |
commit | d2de53124ec55390ce1ec66fd1fbf28b5a7ec4ec (patch) | |
tree | 27e5a20ebadcda78562404cc4571c3a720b9739d /absl/flags | |
parent | fdf5be1108ada4b5525f48542d5fd76731cb880e (diff) |
Use a shared (reader) lock in absl_flags::WasPresentOnCommandLine
PiperOrigin-RevId: 553209806
Change-Id: I6828c3a5df1981471bca7f2f6cb16dfd60e77a96
Diffstat (limited to 'absl/flags')
-rw-r--r-- | absl/flags/parse.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/absl/flags/parse.cc b/absl/flags/parse.cc index 4cdd9d0a..526b61d1 100644 --- a/absl/flags/parse.cc +++ b/absl/flags/parse.cc @@ -637,7 +637,7 @@ void ReportUnrecognizedFlags( // -------------------------------------------------------------------- bool WasPresentOnCommandLine(absl::string_view flag_name) { - absl::MutexLock l(&specified_flags_guard); + absl::ReaderMutexLock l(&specified_flags_guard); ABSL_INTERNAL_CHECK(specified_flags != nullptr, "ParseCommandLine is not invoked yet"); |