src/KafkaCommand.h
branchv_0
changeset 1 6a2ae23c53c4
parent 0 5499cbd842ab
--- a/src/KafkaCommand.h	Sun Apr 24 22:21:02 2022 +0200
+++ b/src/KafkaCommand.h	Wed Apr 27 01:47:35 2022 +0200
@@ -20,6 +20,7 @@
 #include <sstream>
 #include <vector>
 #include <memory>
+#include <atomic>
 
 #include <relpipe/writer/TypeId.h>
 
@@ -32,11 +33,16 @@
 class KafkaCommand {
 private:
 	std::wstring_convert<codecvt_utf8<wchar_t>> convertor; // TODO: support also other encodings.
+	std::atomic<bool> continueProcessing{true};
 public:
 	virtual ~KafkaCommand();
 
 	void process(std::shared_ptr<writer::RelationalWriter> writer, Configuration& configuration);
 
+	void finish(int sig) {
+		continueProcessing = false;
+	}
+
 };
 
 }