Exemple #1
0
DWORD WINAPI WorkerThread::_ThreadProc(void* p) {
	WorkerThread* thread = (WorkerThread*)p;

	while(true) 	{			
		// Check if we're shutting down
		if ( thread->m_stop ) {
			break;
		}
		
		// Work on tasks
		thread->DoTasks();

		// Tasks are all done, so go idle
		thread->Idle();
	}

	return 0;
}