summaryrefslogtreecommitdiff
path: root/node/Service.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2013-08-05 16:06:16 -0400
committerAdam Ierymenko <adam.ierymenko@gmail.com>2013-08-05 16:06:16 -0400
commita7c4cbe53aad51b3e74fa9cb1af975cb8d356954 (patch)
treee4578c51ea7239aeaf5dd6ebcaa844a0fb00f9ea /node/Service.hpp
parent3368330b777da9561539c04ea589aa7060e1d569 (diff)
downloadinfinitytier-a7c4cbe53aad51b3e74fa9cb1af975cb8d356954.tar.gz
infinitytier-a7c4cbe53aad51b3e74fa9cb1af975cb8d356954.zip
CLI debugging, got rid of nasty old Thread class and replaced with newer cleaner portable idiom.
Diffstat (limited to 'node/Service.hpp')
-rw-r--r--node/Service.hpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/node/Service.hpp b/node/Service.hpp
index c8b729c7..0b00d81d 100644
--- a/node/Service.hpp
+++ b/node/Service.hpp
@@ -60,7 +60,7 @@ class RuntimeEnvironment;
* logged via the standard Logger instance. If the subprocess dies, an
* attempt is made to restart it every second.
*/
-class Service : protected Thread
+class Service
{
public:
/**
@@ -78,7 +78,7 @@ public:
void (*handler)(void *,Service &,const Dictionary &),
void *arg);
- virtual ~Service();
+ ~Service();
/**
* Send a message to service subprocess
@@ -106,12 +106,15 @@ public:
return (_pid > 0);
}
-protected:
- virtual void main()
+ /**
+ * Thread main method; do not call elsewhere
+ */
+ void threadMain()
throw();
private:
const RuntimeEnvironment *_r;
+ Thread<Service> _thread;
std::string _path;
std::string _name;
void *_arg;