本文整理汇总了C++中CPARAM_THREADPROC::bTerminateThread方法的典型用法代码示例。如果您正苦于以下问题:C++ CPARAM_THREADPROC::bTerminateThread方法的具体用法?C++ CPARAM_THREADPROC::bTerminateThread怎么用?C++ CPARAM_THREADPROC::bTerminateThread使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPARAM_THREADPROC
的用法示例。
在下文中一共展示了CPARAM_THREADPROC::bTerminateThread方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CAN_PerformClosureOperations
HRESULT CDIL_CAN_STUB::CAN_PerformClosureOperations(void)
{
//First remove all the client
for (UINT nCount = 0; nCount < sg_unClientCnt; nCount++)
{
CAN_RegisterClient(FALSE, sg_asClientToBufMap[nCount].dwClientID, "");
}
// First disconnect from the simulation engine
CAN_DeselectHwInterface();
// Then terminate the broker thread
sg_sBrokerObjBusEmulation.bTerminateThread();
// Close the notification event
if (NULL != sg_hNotifyFinish)
{
CloseHandle(sg_hNotifyFinish);
sg_hNotifyFinish = NULL;
}
// Delete the critical section
DeleteCriticalSection(&sg_CSBroker);
sg_pIlog = NULL; // Log interface pointer
SetCurrState(STATE_PRIMORDIAL);
return S_OK;
}
示例2: Worker_Disconnect
HRESULT Worker_Disconnect(ISimENG* /*pISimENGLoc*/, Base_WrapperErrorLogger* pIlogLoc)
{
if (GetCurrState() == STATE_PRIMORDIAL)
{
sg_acErrStr = _("CAN_STUB_DeselectHwInterface called at STATE_PRIMORDIAL");
return S_FALSE;
}
else if (GetCurrState() == STATE_RESET)
{
pIlogLoc->vLogAMessage(__FILE__, __LINE__,
(_("CAN_STUB_DeselectHwInterface called at improper state")));
return S_FALSE;
}
// Close the message reading thread
if(sg_unClientCnt <= 0 )
{
//Some Error Happened But Thread close is required.
//sg_unClientCnt = 0 means there is no data flow and thread
//force termination is safe.
sg_sParmRThreadStub.bForceTerminateThread();
}
else
{
sg_sParmRThreadStub.bTerminateThread();
}
return S_OK;
}
示例3: bStopGraphReadThread
/* Function to stop msg read thread*/
BOOL bStopGraphReadThread()
{
BOOL bReturn = FALSE;
bReturn = m_ouGraphReadThread.bTerminateThread();
m_ouGraphReadThread.m_hActionEvent = NULL;
m_ouGraphReadThread.m_unActionCode = IDLE;
return bReturn;
}
示例4: Worker_Disconnect
HRESULT Worker_Disconnect(ISimENG* /*pISimENGLoc*/, Base_WrapperErrorLogger* pIlogLoc)
{
if (GetCurrState() == STATE_PRIMORDIAL)
{
sg_acErrStr = "CAN_STUB_DeselectHwInterface called at STATE_PRIMORDIAL";
return S_FALSE;
}
else if (GetCurrState() == STATE_RESET)
{
pIlogLoc->vLogAMessage(__FILE__, __LINE__,
("CAN_STUB_DeselectHwInterface called at improper state"));
return S_FALSE;
}
// Close the message reading thread
sg_sParmRThreadStub.bTerminateThread();
return S_OK;
}
示例5: FinalRelease
void CSimENG::FinalRelease()
{
// Close the message relay worker thread
sg_sThreadCtrlObj.bTerminateThread();
DeleteCriticalSection(&sg_CriticalSection);
DeleteCriticalSection(&sg_CSMsgEntry);
if (NULL != sg_pbEntry)
{
delete[] sg_pbEntry;
sg_pbEntry = NULL;
sg_nEntryLen = 0;
}
if (NULL != sg_pbEntry2)
{
delete[] sg_pbEntry2;
sg_pbEntry2 = NULL;
sg_nEntryLen2 = 0;
}
}