summaryrefslogtreecommitdiff
path: root/src/threadengines/threadengine_win32.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-09-05 18:44:43 -0400
committerAdam <Adam@anope.org>2011-09-10 02:06:31 -0400
commit63cb8ca24c0d4003343340bb8413b7f84de1a6a3 (patch)
treed71f0cead730065dd8509e284d66b6767e7ebd25 /src/threadengines/threadengine_win32.cpp
parentdc5d1fa21c20000b77bf713585333c79121a8df0 (diff)
Moved signal/thread/mode checking to use signal pipes
Diffstat (limited to 'src/threadengines/threadengine_win32.cpp')
-rw-r--r--src/threadengines/threadengine_win32.cpp25
1 files changed, 6 insertions, 19 deletions
diff --git a/src/threadengines/threadengine_win32.cpp b/src/threadengines/threadengine_win32.cpp
index adefab800..5b6739c52 100644
--- a/src/threadengines/threadengine_win32.cpp
+++ b/src/threadengines/threadengine_win32.cpp
@@ -11,18 +11,6 @@ static DWORD WINAPI entry_point(void *parameter)
return 0;
}
-/** Threadengines constructor
- */
-ThreadEngine::ThreadEngine()
-{
-}
-
-/** Threadengines destructor
- */
-ThreadEngine::~ThreadEngine()
-{
-}
-
/** Join to the thread, sets the exit state to true
*/
void Thread::Join()
@@ -39,17 +27,16 @@ void Thread::Exit()
ExitThread(0);
}
-/** Start a new thread
- * @param thread A pointer to a newley allocated thread
+/** Launch the thread
*/
-void ThreadEngine::Start(Thread *thread)
+void Thread::Start()
{
- thread->Handle = CreateThread(NULL, 0, entry_point, thread, 0, NULL);
+ this->Handle = CreateThread(NULL, 0, entry_point, this, 0, NULL);
- if (!thread->Handle)
+ if (!this->Handle)
{
- delete thread;
- throw CoreException(Anope::string("Unable to create thread: ") + Anope::LastError());
+ this->SetFlag(SF_DEAD);
+ throw CoreException("Unable to create thread: " + Anope::LastError());
}
}