1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 16:46:37 +02:00

Merged branch threadingengine with master - Added a threading engine

This commit is contained in:
Adam
2010-05-05 18:14:06 -04:00
committed by Adam
parent 503958aa77
commit 031bc4a8b0
10 changed files with 395 additions and 4 deletions
+38
View File
@@ -0,0 +1,38 @@
#include "services.h"
ThreadEngine threadEngine;
/** Threads constructor
*/
Thread::Thread() : Exit(false)
{
}
/** Threads destructor
*/
Thread::~Thread()
{
Join();
}
/** Sets the exit state as true informing the thread we want it to shut down
*/
void Thread::SetExitState()
{
Exit = true;
}
/** Returns the exit state of the thread
* @return true if we want to exit
*/
bool Thread::GetExitState() const
{
return Exit;
}
/** Called to run the thread, should be overloaded
*/
void Thread::Run()
{
}