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


Python Process.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from multiprocessing.process import Process [as 别名]
# 或者: from multiprocessing.process.Process import __init__ [as 别名]
 def __init__(self, fd, queue):
     assert hasattr(queue, 'put')
     assert hasattr(queue, 'empty')
     assert callable(fd.readline)
     Process.__init__(self)
     self._fd = fd
     self._queue = queue
开发者ID:YunoHost,项目名称:moulinette,代码行数:9,代码来源:stream.py

示例2: __init__

# 需要导入模块: from multiprocessing.process import Process [as 别名]
# 或者: from multiprocessing.process.Process import __init__ [as 别名]
 def __init__(self, pipe, object_class, *args, **kwargs):
     Process.__init__(self)
     self.object_class = object_class
     self.init_args = args
     self.init_kwargs = kwargs
     self.pipe = pipe
     self.command_queue = []
     self.message_priorities = {}
开发者ID:jonathanverner,项目名称:qidle,代码行数:10,代码来源:objects.py

示例3: __init__

# 需要导入模块: from multiprocessing.process import Process [as 别名]
# 或者: from multiprocessing.process.Process import __init__ [as 别名]
 def __init__(self, sem, port=2022, protocol=ProtocolEnumerator.ECHO, users={}):
     Process.__init__(self, name = "SSHServer")
     self.port = port
     self.users = users
     self.privateKeys = {}
     self.publicKeys = {}
     self.protocol_ = protocol
     self.exitCmd = "exit"
     self.messages = []
     self.sem = sem
开发者ID:sys-git,项目名称:stb-rebooter,代码行数:12,代码来源:SSHServer1.py

示例4: __init__

# 需要导入模块: from multiprocessing.process import Process [as 别名]
# 或者: from multiprocessing.process.Process import __init__ [as 别名]
	def __init__(self, **kwargs):
		"""
		@param init_target: unbound instance method to call at process start
		@param wrap_target: unbound instance method to wrap worker function
		@param term_target: unbound instance method to call at process finish
		"""
		self._init_target = kwargs.pop("init_target", lambda self: None).__get__(self, Process)
		self._wrap_target = kwargs.pop("wrap_target", lambda self: None).__get__(self, Process)
		self._term_target = kwargs.pop("term_target", lambda self: None).__get__(self, Process)
		Process.__init__(self, **kwargs)
开发者ID:infinity0,项目名称:tag-routing,代码行数:12,代码来源:contextprocess.py

示例5: __init__

# 需要导入模块: from multiprocessing.process import Process [as 别名]
# 或者: from multiprocessing.process.Process import __init__ [as 别名]
 def __init__(self, event_loop = ThreadedEventLoop()):
     Process.__init__(self)
     self.server_pipe, self.client_pipe = Pipe()
     self.server_router = Router(self.server_pipe)
     self.client_router = Router(self.client_pipe)
     self.srv_command_pipe = self.server_router.create()
     self.cli_command_pipe = self.client_router.create(self.srv_command_pipe.id)
     self.children = {}
     self.client_event_loop = event_loop
     self.client_event_loop.register_hook(self.client_router.eventloop_hook)
开发者ID:jonathanverner,项目名称:qidle,代码行数:12,代码来源:factory.py

示例6: __init__

# 需要导入模块: from multiprocessing.process import Process [as 别名]
# 或者: from multiprocessing.process.Process import __init__ [as 别名]
    def __init__(self, username, password, host, cmdsToSend, port = 22, exitCmd = "exit", timeout = None):
        Process.__init__(self, name = "SSHClient")

        self.logger = LogManager().getLogger('SSHClient-%s' % host)
        self.username = username
        self.password = password
        self.host = host
        self.port = int(port)
        self.cmdsToSend = cmdsToSend if isinstance(cmdsToSend, list) else [cmdsToSend]
        self.exitCmd = exitCmd

        self.queue = Queue()
        self.msg = ""
        self.status = Status.FAILURE
        self.startTime = Value('d', 0.0)
        self.endTime = Value('d', 0.0)
        self.timeout = timeout or SSHClient.TIMEOUT
        self.cmdsSend = False
        self.start()
开发者ID:sys-git,项目名称:YATES,代码行数:21,代码来源:SSH.py

示例7: __init__

# 需要导入模块: from multiprocessing.process import Process [as 别名]
# 或者: from multiprocessing.process.Process import __init__ [as 别名]
 def __init__(self, queue):
     Process.__init__(self, name = "UDPServer")
     #self.daemon = True
     self.queue = queue
     self.shutdownQueue = Queue()
     self.start()
开发者ID:smokedice,项目名称:YATES,代码行数:8,代码来源:UDP.py

示例8: __init__

# 需要导入模块: from multiprocessing.process import Process [as 别名]
# 或者: from multiprocessing.process.Process import __init__ [as 别名]
 def __init__(self, group=None, target=None, name=None, args=(), kwargs={}):
     Process.__init__(self, group=group, target=target, name=name, args=args, kwargs=kwargs)
开发者ID:luasdtu,项目名称:MMPE,代码行数:4,代码来源:ScriptingWindow.py

示例9: __init__

# 需要导入模块: from multiprocessing.process import Process [as 别名]
# 或者: from multiprocessing.process.Process import __init__ [as 别名]
 def __init__(self, sa):
     Process.__init__(self)
     self.sa = sa
     self.arr = sa.getNumpyWrapper()
开发者ID:khaikhai,项目名称:kineticsTools,代码行数:6,代码来源:testShared.py


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