From 587bb4d04bfeed40ba744e8230dd5acdcad39bd6 Mon Sep 17 00:00:00 2001 From: Stefan Pöschel Date: Sun, 28 Jan 2018 14:49:02 +0100 Subject: C++11: use atomic bool instead of mutex --- src/odr-padenc.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/odr-padenc.h') 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 +#include #include #include #include @@ -92,8 +92,7 @@ protected: int output_fd; steady_clock::time_point run_timeline; - std::mutex status_mutex; - bool do_exit; + std::atomic do_exit; PadEncoder(PadEncoderOptions options) : options(options), @@ -113,7 +112,7 @@ public: virtual ~PadEncoder() {} int Main(); - void DoExit(); + void DoExit() {do_exit = true;} }; -- cgit v1.2.3