From 3f094996520fbf006a567873bc9da4d1b430345f Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 10 Jan 2014 10:04:52 +0100 Subject: kill ZMQ thread when InputZeroMQReader is destroyed --- src/InputReader.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/InputReader.h b/src/InputReader.h index 8917922..015303d 100644 --- a/src/InputReader.h +++ b/src/InputReader.h @@ -164,6 +164,11 @@ class InputZeroMQReader : public InputReader workerdata_.in_messages = &in_messages_; } + ~InputZeroMQReader() + { + worker_.Stop(); + } + int Open(std::string uri); int GetNextFrame(void* buffer); @@ -171,6 +176,7 @@ class InputZeroMQReader : public InputReader void PrintInfo(); private: + InputZeroMQReader(const InputZeroMQReader& other) {} Logger logger_; std::string uri_; -- cgit v1.2.3