aboutsummaryrefslogtreecommitdiffstats
path: root/src/odr-padenc.h
diff options
context:
space:
mode:
authorStefan Pöschel <github@basicmaster.de>2018-01-28 14:49:02 +0100
committerStefan Pöschel <github@basicmaster.de>2018-01-28 14:49:02 +0100
commit587bb4d04bfeed40ba744e8230dd5acdcad39bd6 (patch)
tree15ab44953e71b0c92b8ec4651f9f693ec06f5e26 /src/odr-padenc.h
parent8f106211163894144af453ec91c73d9eadaddcb1 (diff)
downloadODR-PadEnc-587bb4d04bfeed40ba744e8230dd5acdcad39bd6.tar.gz
ODR-PadEnc-587bb4d04bfeed40ba744e8230dd5acdcad39bd6.tar.bz2
ODR-PadEnc-587bb4d04bfeed40ba744e8230dd5acdcad39bd6.zip
C++11: use atomic bool instead of mutex
Diffstat (limited to 'src/odr-padenc.h')
-rw-r--r--src/odr-padenc.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/odr-padenc.h b/src/odr-padenc.h
index fe5d375..022ae9c 100644
--- a/src/odr-padenc.h
+++ b/src/odr-padenc.h
@@ -29,7 +29,7 @@
#include "common.h"
-#include <mutex>
+#include <atomic>
#include <stdlib.h>
#include <signal.h>
#include <string>
@@ -92,8 +92,7 @@ protected:
int output_fd;
steady_clock::time_point run_timeline;
- std::mutex status_mutex;
- bool do_exit;
+ std::atomic<bool> do_exit;
PadEncoder(PadEncoderOptions options) :
options(options),
@@ -113,7 +112,7 @@ public:
virtual ~PadEncoder() {}
int Main();
- void DoExit();
+ void DoExit() {do_exit = true;}
};