Initial
This commit is contained in:
43
thread/QTHREAD.CPP
Normal file
43
thread/QTHREAD.CPP
Normal file
@@ -0,0 +1,43 @@
|
||||
#include <thread/qthread.hpp>
|
||||
#include <thread/msgqueue.hpp>
|
||||
|
||||
DWORD WINAPI QueueThread::sThreadProc(LPVOID lpInstanceData)
|
||||
{
|
||||
String infoBuff;
|
||||
|
||||
::sprintf(infoBuff,"<QueueThread::sThreadProc> Thread 0x%08lx started.\n",::GetCurrentThreadId());
|
||||
::OutputDebugString(infoBuff);
|
||||
QueueThread &queueThread=(*((QueueThread*)lpInstanceData));
|
||||
queueThread.mQueueThreadDestructorMutex.requestMutex();
|
||||
queueThread.startupex();
|
||||
queueThread.startup();
|
||||
queueThread.messageLoop();
|
||||
queueThread.shutdown();
|
||||
queueThread.mQueueThreadDestructorMutex.releaseMutex();
|
||||
::sprintf(infoBuff,"<QueueThread::sThreadProc> Thread 0x%08lx exited normally.\n",::GetCurrentThreadId());
|
||||
::OutputDebugString(infoBuff);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void QueueThread::startupex(void)
|
||||
{
|
||||
mQueueThreadStartupEvent.setEvent();
|
||||
}
|
||||
|
||||
// virtual defaults
|
||||
|
||||
void QueueThread::startup(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void QueueThread::messageLoop(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void QueueThread::shutdown(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user