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


Python SpawnProcess._async_wait方法代码示例

本文整理汇总了Python中_emerge.SpawnProcess.SpawnProcess._async_wait方法的典型用法代码示例。如果您正苦于以下问题:Python SpawnProcess._async_wait方法的具体用法?Python SpawnProcess._async_wait怎么用?Python SpawnProcess._async_wait使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在_emerge.SpawnProcess.SpawnProcess的用法示例。


在下文中一共展示了SpawnProcess._async_wait方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _unlock_builddir_exit

# 需要导入模块: from _emerge.SpawnProcess import SpawnProcess [as 别名]
# 或者: from _emerge.SpawnProcess.SpawnProcess import _async_wait [as 别名]
	def _unlock_builddir_exit(self, unlock_future, returncode=None):
		# Normally, async_unlock should not raise an exception here.
		unlock_future.cancelled() or unlock_future.result()
		if returncode is not None:
			if unlock_future.cancelled():
				self.cancelled = True
				self._was_cancelled()
			else:
				self.returncode = returncode
			SpawnProcess._async_wait(self)
开发者ID:gentoo,项目名称:portage,代码行数:12,代码来源:AbstractEbuildProcess.py

示例2: _async_wait

# 需要导入模块: from _emerge.SpawnProcess import SpawnProcess [as 别名]
# 或者: from _emerge.SpawnProcess.SpawnProcess import _async_wait [as 别名]
	def _async_wait(self):
		"""
		Override _async_wait to asynchronously unlock self._build_dir
		when necessary.
		"""
		if self._build_dir is None:
			SpawnProcess._async_wait(self)
		elif self._build_dir_unlock is None:
			if self.returncode is None:
				raise asyncio.InvalidStateError('Result is not ready.')
			self._async_unlock_builddir(returncode=self.returncode)
开发者ID:gentoo,项目名称:portage,代码行数:13,代码来源:AbstractEbuildProcess.py


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