本文整理汇总了Python中multiprocessing.managers.SyncManager._finalize_manager方法的典型用法代码示例。如果您正苦于以下问题:Python SyncManager._finalize_manager方法的具体用法?Python SyncManager._finalize_manager怎么用?Python SyncManager._finalize_manager使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类multiprocessing.managers.SyncManager
的用法示例。
在下文中一共展示了SyncManager._finalize_manager方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _finalize_manager
# 需要导入模块: from multiprocessing.managers import SyncManager [as 别名]
# 或者: from multiprocessing.managers.SyncManager import _finalize_manager [as 别名]
def _finalize_manager(process, address, authkey, state, _Client):
try:
SyncManager._finalize_manager(process, address, authkey, state,
_Client)
except WindowsError:
# http://stackoverflow.com/questions/17076679/windowserror-access-is-denied-on-calling-process-terminate
pass
示例2: _finalize_manager
# 需要导入模块: from multiprocessing.managers import SyncManager [as 别名]
# 或者: from multiprocessing.managers.SyncManager import _finalize_manager [as 别名]
def _finalize_manager(process, *args, **kwargs):
"""Shutdown the manager process."""
def _join(functor, *args, **kwargs):
timeout = kwargs.get('timeout')
if not timeout is None and timeout < 1:
kwargs['timeout'] = 1
functor(*args, **kwargs)
process.join = functools.partial(_join, process.join)
SyncManager._finalize_manager(process, *args, **kwargs)