Skip to content

Commit

Permalink
Use std::atomic<bool> (#1611)
Browse files Browse the repository at this point in the history
  • Loading branch information
externl authored Dec 19, 2023
1 parent 2c51af7 commit 8fa9eaf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cpp/include/Ice/MetricsObserverI.h
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ class ObserverFactoryT : public Updater, private IceUtil::Mutex
IceInternal::MetricsAdminIPtr _metrics;
const std::string _name;
MetricsMapSeqType _maps;
std::atomic<int> _enabled;
std::atomic<bool> _enabled;
UpdaterPtr _updater;
};

Expand Down
1 change: 1 addition & 0 deletions cpp/include/IceUtil/Shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define ICE_UTIL_SHARED_H

#include <IceUtil/Config.h>
#include <atomic>

//
// Base classes for reference counted types. The IceUtil::Handle
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/Ice/Instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class Timer : public IceUtil::Timer
virtual void runTimerTask(const IceUtil::TimerTaskPtr&);

IceUtil::Mutex _mutex;
std::atomic<int> _hasObserver;
std::atomic<bool> _hasObserver;
ObserverHelperT<Ice::Instrumentation::ThreadObserver> _observer;
};

Expand Down

0 comments on commit 8fa9eaf

Please sign in to comment.