当前位置: 首页>>代码示例>>C++>>正文


C++ ProcessPtr::get方法代码示例

本文整理汇总了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;
	}
}
开发者ID:godentarek,项目名称:passenger,代码行数:41,代码来源:Implementation.cpp

示例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);
}
开发者ID:dbabox,项目名称:aomi,代码行数:6,代码来源:WheelAnimalProcessManager.cpp


注:本文中的ProcessPtr::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。