本文整理汇总了C++中GuestWaitEvent::Cancel方法的典型用法代码示例。如果您正苦于以下问题:C++ GuestWaitEvent::Cancel方法的具体用法?C++ GuestWaitEvent::Cancel怎么用?C++ GuestWaitEvent::Cancel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GuestWaitEvent
的用法示例。
在下文中一共展示了GuestWaitEvent::Cancel方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: cancelWaitEvents
int GuestBase::cancelWaitEvents(void)
{
LogFlowThisFuncEnter();
int rc = RTCritSectEnter(&mWaitEventCritSect);
if (RT_SUCCESS(rc))
{
GuestEventGroup::iterator itEventGroups = mWaitEventGroups.begin();
while (itEventGroups != mWaitEventGroups.end())
{
GuestWaitEvents::iterator itEvents = itEventGroups->second.begin();
while (itEvents != itEventGroups->second.end())
{
GuestWaitEvent *pEvent = itEvents->second;
AssertPtr(pEvent);
/*
* Just cancel the event, but don't remove it from the
* wait events map. Don't delete it though, this (hopefully)
* is done by the caller using unregisterWaitEvent().
*/
int rc2 = pEvent->Cancel();
AssertRC(rc2);
itEvents++;
}
itEventGroups++;
}
int rc2 = RTCritSectLeave(&mWaitEventCritSect);
if (RT_SUCCESS(rc))
rc = rc2;
}
LogFlowFuncLeaveRC(rc);
return rc;
}