retrievalthread.cpp

来自「一个监控进程创建和退出的例子」· C++ 代码 · 共 51 行

CPP
51
字号
//---------------------------------------------------------------------------
//
// RetrievalThread.cpp
//
// SUBSYSTEM: 
//              Monitoring process creation and termination  
//				
// MODULE:    
//              Provides an interface for handling queued items
//
// DESCRIPTION:
//
// AUTHOR:		Ivo Ivanov
//                                                                         
//---------------------------------------------------------------------------
#include "RetrievalThread.h"
#include "QueueContainer.h"

//---------------------------------------------------------------------------
//
// class CRetrievalThread
//
//---------------------------------------------------------------------------

CRetrievalThread::CRetrievalThread(
	TCHAR*            pszThreadGuid,
	CQueueContainer*  pQueue
	):
	CCustomThread(pszThreadGuid),
	m_pQueue(pQueue)
{
	assert( NULL != m_pQueue );
}

CRetrievalThread::~CRetrievalThread()
{

}


//
// A user supplied implementation of the thread function.
// Override Run() and insert the code that should be executed when 
// the thread runs.
//
void CRetrievalThread::Run()
{
	m_pQueue->WaitOnElementAvailable();
}

//----------------------------End of the file -------------------------------

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?