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:
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user