本文整理汇总了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)
示例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)