]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/capture/nfqueue/nfqueue.h
Move strategy into job.
[stg.git] / projects / stargazer / plugins / capture / nfqueue / nfqueue.h
index 7d71bcd23e38885547b093c10bd7e84cbc3caed1..402e36bf4a6a1e37465fbf24089e899bbeacef50 100644 (file)
 
 #include <string>
 #include <vector>
-
-#include <pthread.h>
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow"
+#include <jthread.hpp>
+#pragma GCC diagnostic pop
 
 namespace STG
 {
@@ -69,12 +71,11 @@ private:
     NFQ_CAP(const NFQ_CAP & rvalue);
     NFQ_CAP & operator=(const NFQ_CAP & rvalue);
 
-    static void *       Run(void *);
+    void                Run(std::stop_token token);
 
     mutable std::string errorStr;
 
-    pthread_t           thread;
-    bool                nonstop;
+    std::jthread        m_thread;
     bool                isRunning;
     STG::ModuleSettings     settings;