Skip to content

Commit 4053fdb

Browse files
Merge pull request #5529 from kamil-holubicki/PS-9621-8.0
(8.0) PS-9621: Initialization of std::atomic_flag caller_active_ in Percona Telemetry component is not compliant with the standard
2 parents d37bf16 + d80dd85 commit 4053fdb

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

components/percona_telemetry/worker.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ Worker::Worker(Config &config, Storage &storage, DataProvider &data_provider,
2525
storage_(storage),
2626
data_provider_(data_provider),
2727
logger_(logger),
28-
stop_worker_thd_(false),
29-
caller_active_(ATOMIC_FLAG_INIT) {}
28+
stop_worker_thd_(false) {}
3029

3130
bool Worker::start() {
3231
std::thread thd(&Worker::worker_thd_fn, this);

components/percona_telemetry/worker.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class Worker {
4444
DataProvider &data_provider_;
4545
Logger &logger_;
4646
std::atomic_bool stop_worker_thd_;
47-
std::atomic_flag caller_active_;
47+
std::atomic_flag caller_active_ = ATOMIC_FLAG_INIT;
4848
std::condition_variable cv_;
4949

5050
std::thread thd_;

0 commit comments

Comments
 (0)