1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 05:13:12 +02:00

Split db_mysql_live into two modules so other modules can make use of the asynchronous command interface

This commit is contained in:
Adam
2011-02-17 14:31:21 -05:00
parent 18bd33f9a4
commit 536ea2189a
8 changed files with 277 additions and 172 deletions
+3 -3
View File
@@ -20,7 +20,7 @@ void ThreadEngine::Process()
/** Threads constructor
*/
Thread::Thread() : Exit(false)
Thread::Thread() : exit(false)
{
threadEngine.threads.push_back(this);
}
@@ -41,7 +41,7 @@ Thread::~Thread()
*/
void Thread::SetExitState()
{
Exit = true;
exit = true;
}
/** Returns the exit state of the thread
@@ -49,7 +49,7 @@ void Thread::SetExitState()
*/
bool Thread::GetExitState() const
{
return Exit;
return exit;
}
/** Called to run the thread, should be overloaded
@@ -39,6 +39,13 @@ void Thread::Join()
pthread_join(Handle, NULL);
}
/** Exit the thread. Note that the thread still must be joined to free resources!
*/
void Thread::Exit()
{
pthread_exit(0);
}
/** Start a new thread
* @param thread A pointer to a newley allocated thread
*/
+7
View File
@@ -31,6 +31,13 @@ void Thread::Join()
WaitForSingleObject(Handle, INFINITE);
}
/** Exit the thread. Note that the thread still must be joined to free resources!
*/
void Thread::Exit()
{
ExitThread(0);
}
/** Start a new thread
* @param thread A pointer to a newley allocated thread
*/