]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/configuration/sgconfig/stgconfig.h
Complete replacement notifiers with subscriptions.
[stg.git] / projects / stargazer / plugins / configuration / sgconfig / stgconfig.h
index b7684e3390909e79cfcf6d0d8be99aaedb384cbe..f4f94ee8391aa354973a83c5c703f2639279d610 100644 (file)
 #include "stg/logger.h"
 
 #include <string>
-
-#include <pthread.h>
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow"
+#include <jthread.hpp>
+#pragma GCC diagnostic pop
 
 class STG_CONFIG_SETTINGS
 {
@@ -72,11 +74,11 @@ class STG_CONFIG : public STG::Plugin
         STG_CONFIG(const STG_CONFIG & rvalue);
         STG_CONFIG & operator=(const STG_CONFIG & rvalue);
 
-        static void *       Run(void *);
+        void                Run(std::stop_token token);
 
         mutable std::string errorStr;
         STG_CONFIG_SETTINGS stgConfigSettings;
-        pthread_t           thread;
+        std::jthread        m_thread;
         bool                nonstop;
         bool                isRunning;
         STG::PluginLogger   logger;