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


Python SyncManager.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from multiprocessing.managers import SyncManager [as 别名]
# 或者: from multiprocessing.managers.SyncManager import __init__ [as 别名]
    def __init__(self, queue_size=None):
        #print "instantiating process manager"
        SyncManager.__init__(self)

        self.start()

        self.ff = None
        self.input_queue = self.Queue(queue_size)
        self.output_queue = self.Queue(queue_size)
        self.worker = None
开发者ID:braingram,项目名称:eyetracker,代码行数:12,代码来源:PipelinedFeatureFinder.py

示例2: __int__

# 需要导入模块: from multiprocessing.managers import SyncManager [as 别名]
# 或者: from multiprocessing.managers.SyncManager import __init__ [as 别名]
    def __int__(self, name='default', address=None, authkey=None):
        """
        This is the default constructor for the class.

        :param name:    The manager name
        :param address: The address of the server
        :param authkey: The auth key
        :return:
        """

        # Set internals
        self.__name     = name

        # Override the manager
        SyncManager.__init__(address, authkey)
        return
开发者ID:CaptFrank,项目名称:NetworkDeviceMonitor,代码行数:18,代码来源:Manager.py

示例3: __int__

# 需要导入模块: from multiprocessing.managers import SyncManager [as 别名]
# 或者: from multiprocessing.managers.SyncManager import __init__ [as 别名]
    def __int__(self, address=MANAGER_ADDRESS, authkey=MANAGER_PASSWORD):
        """
        This is the default constructor for the
        class that registers the valid methods that
        can be called in the manager context.

        :param address:         The address as a tuple (address, port)
        :param auth:            The authentication for the server
        :return:
        """

        self.register("get_MqttRxBuffer")
        self.register("get_MqttTxBuffer")
        self.register("get_RawRxBuffer")
        self.register("get_RawTxBuffer")

        # Override the base class
        SyncManager.__init__(address, authkey)
        return
开发者ID:CaptFrank,项目名称:WebWasher,代码行数:21,代码来源:Manager.py

示例4: __init__

# 需要导入模块: from multiprocessing.managers import SyncManager [as 别名]
# 或者: from multiprocessing.managers.SyncManager import __init__ [as 别名]
    def __init__(self, address=MANAGER_ADDRESS, pwd=MANAGER_PASSWORD):
        """
        This is the constructor for the class object that takes
        both the managers address and password.

        :param address:     The address of the manager server
        :param pwd:         The managers password access
        :return:
        """

        # Override the base class
        SyncManager.__init__(address, pwd)
        Singleton.__init__(self)

        # Register the classes needed
        self.register("get_MqttRxBuffer", callable=lambda: self.__MqttRxBuffer)
        self.register("get_MqttTxBuffer", callable=lambda: self.__MqttTxBuffer)
        self.register("get_RawRxBuffer", callable=lambda: self.__RawTxBuffer)
        self.register("get_RawTxBuffer", callable=lambda: self.__RawRxBuffer)
        return
开发者ID:CaptFrank,项目名称:WebWasher,代码行数:22,代码来源:Manager.py

示例5: __init__

# 需要导入模块: from multiprocessing.managers import SyncManager [as 别名]
# 或者: from multiprocessing.managers.SyncManager import __init__ [as 别名]
    def __init__(self, name="TaskList", mix_ins=None,
                        prefix='ask_', *args, **kwds):
        SyncManager.__init__(self)

        self._name = name
        self._mix_ins = mix_ins
        self._prefix = prefix
        self._args = args
        self._kwds = kwds
        
        x = []
        if mix_ins:
            for m in mix_ins:
                for attr in dir(m):
                    if attr.startswith(prefix):
                        x.append(attr)
        self.register(
            'TaskList',
            callable=TaskList,
            exposed=(x))
开发者ID:migacollabs,项目名称:Pyaella,代码行数:22,代码来源:tasks.py

示例6: __init__

# 需要导入模块: from multiprocessing.managers import SyncManager [as 别名]
# 或者: from multiprocessing.managers.SyncManager import __init__ [as 别名]
	def __init__(self, host, port):
		SyncManager.__init__(self, address=(host, port), authkey='rWorker')
		Manager.has_instance = True
开发者ID:tristanvdb,项目名称:rWorker,代码行数:5,代码来源:manager.py

示例7: __init__

# 需要导入模块: from multiprocessing.managers import SyncManager [as 别名]
# 或者: from multiprocessing.managers.SyncManager import __init__ [as 别名]
 def __init__(self):
    SyncManager.__init__(self)
       self.register(	'DiskSpaceProctor',
             callable=DiskSpaceProctor,
             exposed=('_can_write', '_close_write', 'make_dirs'))
开发者ID:jacob-carrier,项目名称:code,代码行数:7,代码来源:recipe-577140.py


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