mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Utils: Use atomic in VolumeMeter manager
This commit is contained in:
parent
e1cb858d2d
commit
bb2c125601
@ -278,9 +278,7 @@ Utils::Obs::VolumeMeter::Handler::~Handler()
|
||||
signal_handler_disconnect(sh, "source_deactivate", Handler::InputDeactivateCallback, this);
|
||||
|
||||
if (_running) {
|
||||
_mutex.lock();
|
||||
_running = false;
|
||||
_mutex.unlock();
|
||||
_cond.notify_all();
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ namespace Utils {
|
||||
|
||||
std::mutex _mutex;
|
||||
std::condition_variable _cond;
|
||||
bool _running;
|
||||
std::atomic<bool> _running;
|
||||
std::thread _updateThread;
|
||||
|
||||
void UpdateThread();
|
||||
|
Loading…
Reference in New Issue
Block a user