44 lines
963 B
C++
44 lines
963 B
C++
#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;
|
|
}
|
|
|