diff options
author | Thomas Habets <thomas@habets.se> | 2020-08-11 11:38:56 +0100 |
---|---|---|
committer | Martin Braun <martin@gnuradio.org> | 2020-08-14 04:19:58 -0700 |
commit | 048e5b1ec1261422e1856f982ba97b4c371b3eb0 (patch) | |
tree | bfea76c73b96c45ffbea3f7c8831b13de5adc38b /gr-blocks/lib/message_strobe_impl.h | |
parent | 41d6265b8b049b78757770d65cee7b7e2bbbab9f (diff) |
blocks/message_strobe: Use atomic for thread sync
Diffstat (limited to 'gr-blocks/lib/message_strobe_impl.h')
-rw-r--r-- | gr-blocks/lib/message_strobe_impl.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gr-blocks/lib/message_strobe_impl.h b/gr-blocks/lib/message_strobe_impl.h index 1cb75492ea..f378054813 100644 --- a/gr-blocks/lib/message_strobe_impl.h +++ b/gr-blocks/lib/message_strobe_impl.h @@ -12,6 +12,7 @@ #define INCLUDED_GR_MESSAGE_STROBE_IMPL_H #include <gnuradio/blocks/message_strobe.h> +#include <atomic> namespace gr { namespace blocks { @@ -20,7 +21,7 @@ class BLOCKS_API message_strobe_impl : public message_strobe { private: gr::thread::thread d_thread; - bool d_finished; + std::atomic<bool> d_finished; long d_period_ms; pmt::pmt_t d_msg; const pmt::pmt_t d_port; |