diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-07-31 10:06:59 -0400 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-07-31 10:06:59 -0400 |
commit | 2ba97fb46b1b405161a3d391842566b057800f4c (patch) | |
tree | 2d33340de3f63af830140ecb148a91a1ddb6a3ee | |
parent | 9df88a3933ae75ff2ec9bfa951a71fcc0164df74 (diff) | |
download | infinitytier-2ba97fb46b1b405161a3d391842566b057800f4c.tar.gz infinitytier-2ba97fb46b1b405161a3d391842566b057800f4c.zip |
Remove suicidalThread hack from Thread.
-rw-r--r-- | node/Thread.cpp | 10 | ||||
-rw-r--r-- | node/Thread.hpp | 5 |
2 files changed, 0 insertions, 15 deletions
diff --git a/node/Thread.cpp b/node/Thread.cpp index 37a1a5a5..71cfcaea 100644 --- a/node/Thread.cpp +++ b/node/Thread.cpp @@ -47,7 +47,6 @@ static void *__m_thread_main(void *ptr) namespace ZeroTier {
Thread::Thread() :
- suicidalThread(false),
_impl(malloc(sizeof(pthread_t))),
_running()
{
@@ -84,10 +83,6 @@ void Thread::__intl_run() for(;;) {
_notInit = false;
this->main();
- if (suicidalThread) {
- delete this;
- return;
- }
if (_notInit) // UGLY ASS HACK: see main()
usleep(50);
else break;
@@ -127,7 +122,6 @@ struct __m_thread_info namespace ZeroTier {
Thread::Thread() :
- suicidalThread(false),
_impl(malloc(sizeof(__m_thread_info))),
_running()
{
@@ -162,10 +156,6 @@ void Thread::__intl_run() for(;;) {
_notInit = false;
this->main();
- if (suicidalThread) {
- delete this;
- return;
- }
if (_notInit)
Thread::sleep(50);
else break;
diff --git a/node/Thread.hpp b/node/Thread.hpp index b023fbae..9b399a00 100644 --- a/node/Thread.hpp +++ b/node/Thread.hpp @@ -78,11 +78,6 @@ protected: virtual void main()
throw();
- /**
- * Subclasses can set to true to cause Thread to delete itself on exit
- */
- volatile bool suicidalThread;
-
private:
void *_impl;
AtomicCounter _running;
|