Skip to content

Commit

Permalink
Merge pull request #5529 from kamil-holubicki/PS-9621-8.0
Browse files Browse the repository at this point in the history
(8.0) PS-9621: Initialization of std::atomic_flag caller_active_ in Percona Telemetry component is not compliant with the standard
  • Loading branch information
kamil-holubicki authored Jan 8, 2025
2 parents d37bf16 + d80dd85 commit 4053fdb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions components/percona_telemetry/worker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ Worker::Worker(Config &config, Storage &storage, DataProvider &data_provider,
storage_(storage),
data_provider_(data_provider),
logger_(logger),
stop_worker_thd_(false),
caller_active_(ATOMIC_FLAG_INIT) {}
stop_worker_thd_(false) {}

bool Worker::start() {
std::thread thd(&Worker::worker_thd_fn, this);
Expand Down
2 changes: 1 addition & 1 deletion components/percona_telemetry/worker.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Worker {
DataProvider &data_provider_;
Logger &logger_;
std::atomic_bool stop_worker_thd_;
std::atomic_flag caller_active_;
std::atomic_flag caller_active_ = ATOMIC_FLAG_INIT;
std::condition_variable cv_;

std::thread thd_;
Expand Down

0 comments on commit 4053fdb

Please sign in to comment.