本文整理汇总了C++中ProcessPtr::get方法的典型用法代码示例。如果您正苦于以下问题:C++ ProcessPtr::get方法的具体用法?C++ ProcessPtr::get怎么用?C++ ProcessPtr::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProcessPtr
的用法示例。
在下文中一共展示了ProcessPtr::get方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getPool
// The 'self' parameter is for keeping the current Group object alive
void
Group::lockAndMaybeInitiateOobw(const ProcessPtr &process, DisableResult result, GroupPtr self) {
TRACE_POINT();
// Standard resource management boilerplate stuff...
Pool *pool = getPool();
boost::unique_lock<boost::mutex> lock(pool->syncher);
if (OXT_UNLIKELY(!process->isAlive() || !isAlive())) {
return;
}
assert(process->oobwStatus == Process::OOBW_IN_PROGRESS);
if (result == DR_SUCCESS) {
if (process->enabled == Process::DISABLED) {
P_DEBUG("Process " << process->inspect() << " disabled; proceeding " <<
"with out-of-band work");
process->oobwStatus = Process::OOBW_REQUESTED;
if (shouldInitiateOobw(process.get())) {
initiateOobw(process);
} else {
// We do not re-enable the process because it's likely that the
// administrator has explicitly changed the state.
P_DEBUG("Out-of-band work for process " << process->inspect() << " aborted "
"because the process no longer requests out-of-band work");
process->oobwStatus = Process::OOBW_NOT_ACTIVE;
}
} else {
// We do not re-enable the process because it's likely that the
// administrator has explicitly changed the state.
P_DEBUG("Out-of-band work for process " << process->inspect() << " aborted "
"because the process was reenabled after disabling");
process->oobwStatus = Process::OOBW_NOT_ACTIVE;
}
} else {
P_DEBUG("Out-of-band work for process " << process->inspect() << " aborted "
"because the process could not be disabled");
process->oobwStatus = Process::OOBW_NOT_ACTIVE;
}
}
示例2: runProcess
void WheelAnimalProcessManager::runProcess(WheelAnimalProcess::PROCESS process,Orz::Event * evt)
{
_referenced = evt->getData<ReferenceCount *>()->reference();
ProcessPtr pro = _processes.at(process);
_updateFun = boost::bind(&WheelAnimalProcess::update, pro.get(), _1);
}