本文整理汇总了Python中_multiprocessing.PipeConnection方法的典型用法代码示例。如果您正苦于以下问题:Python _multiprocessing.PipeConnection方法的具体用法?Python _multiprocessing.PipeConnection怎么用?Python _multiprocessing.PipeConnection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类_multiprocessing
的用法示例。
在下文中一共展示了_multiprocessing.PipeConnection方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: rebuild_pipe_connection
# 需要导入模块: import _multiprocessing [as 别名]
# 或者: from _multiprocessing import PipeConnection [as 别名]
def rebuild_pipe_connection(reduced_handle, readable, writable):
handle = rebuild_handle(reduced_handle)
return _multiprocessing.PipeConnection(
handle, readable=readable, writable=writable
)
示例2: rebuild_pipe_connection
# 需要导入模块: import _multiprocessing [as 别名]
# 或者: from _multiprocessing import PipeConnection [as 别名]
def rebuild_pipe_connection(dh, readable, writable):
from multiprocessing.connection import PipeConnection
handle = dh.detach()
return PipeConnection(handle, readable, writable)
示例3: from_handle
# 需要导入模块: import _multiprocessing [as 别名]
# 或者: from _multiprocessing import PipeConnection [as 别名]
def from_handle(cls, phandle, *args, **kwargs):
"""Create a :class:`PipeConnection` from pipe handle `phandle`"""
connection = native_PipeConnection(phandle)
return cls(connection, *args, **kwargs)