本文整理匯總了Python中vlcp.event.runnable.RoutineContainer.__init__方法的典型用法代碼示例。如果您正苦於以下問題:Python RoutineContainer.__init__方法的具體用法?Python RoutineContainer.__init__怎麽用?Python RoutineContainer.__init__使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類vlcp.event.runnable.RoutineContainer
的用法示例。
在下文中一共展示了RoutineContainer.__init__方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: from vlcp.event.runnable import RoutineContainer [as 別名]
# 或者: from vlcp.event.runnable.RoutineContainer import __init__ [as 別名]
def __init__(self, moduleinst, apidefs = None, allowdiscover = True, rejectunknown = True):
RoutineContainer.__init__(self, scheduler=moduleinst.scheduler, daemon=False)
self.handler = EventHandler(self.scheduler)
self.servicename = moduleinst.getServiceName()
self.apidefs = apidefs
self.registeredAPIs = {}
self.discoverinfo = {}
self.allowdiscover = allowdiscover
self.rejectunknown = True
示例2: __init__
# 需要導入模塊: from vlcp.event.runnable import RoutineContainer [as 別名]
# 或者: from vlcp.event.runnable.RoutineContainer import __init__ [as 別名]
def __init__(self, vhostbind, prefix, scheduler=None, singlecastlimit = 256, deflate = False):
RoutineContainer.__init__(self, scheduler=scheduler, daemon=False)
self.vhostbind = vhostbind
self.prefix = _bytes(prefix)
self._matchers = {}
self._publishkey = uuid.uuid1().hex
self._publishno = 1
self._publish_wait = set()
self._matchadd_wait = set()
self._matchremove_wait = set()
self._singlecastlimit = singlecastlimit
self._deflate = deflate
示例3: __init__
# 需要導入模塊: from vlcp.event.runnable import RoutineContainer [as 別名]
# 或者: from vlcp.event.runnable.RoutineContainer import __init__ [as 別名]
def __init__(self, connection, initialkeys, requestid = None, logger = None):
RoutineContainer.__init__(self, connection.scheduler)
self._initialkeys = initialkeys
self._connection = connection
self._walkerdict = {}
self._savedkeys = ()
self._savedresult = []
self._updatedset = set()
self._updatedset2 = set()
if not logger:
self._logger = logging.getLogger(__name__ + '.FlowUpdater')
else:
self._logger = logger
if requestid is None:
self._requstid = str(uuid1())
else:
self._requstid = requestid
self._dataupdateroutine = None
self._flowupdateroutine = None
示例4: __init__
# 需要導入模塊: from vlcp.event.runnable import RoutineContainer [as 別名]
# 或者: from vlcp.event.runnable.RoutineContainer import __init__ [as 別名]
def __init__(self, worker_start, matchers=(), scheduler=None, mp=True, inputlimit=0, allowcontrol=True):
"""
:param worker_start: func(queuein, queueout), queuein is the input queue, queueout is the
output queue. For queuein, each object is (event, matcher) tuple; For queueout, each
object is a tuple of events to send. Every object in queuein must have a response in
queueout.
:param matcheres: match events to be processed by connector.
:param scheduler: bind to specified scheduler
:param mp: use multiprocessing if possible. For windows, multi-threading is always used.
:param inputlimit: input queue size limit. 0 = infinite.
:param allowcontrol: if True, the connector accepts ConnectorControlEvent for connector configuration.
"""
RoutineContainer.__init__(self, scheduler, True)
self.worker_start = worker_start
self.matchers = set(matchers)
self.mp = mp
self.inputlimit = inputlimit
self.allowcontrol = allowcontrol
self.stopreceive = False
self.jobs = 0
self._moreresult_matcher = MoreResultEvent.createMatcher()
示例5: __init__
# 需要導入模塊: from vlcp.event.runnable import RoutineContainer [as 別名]
# 或者: from vlcp.event.runnable.RoutineContainer import __init__ [as 別名]
def __init__(self, connection, passive):
scheduler = connection.scheduler
RoutineContainer.__init__(self, scheduler)
self.passive = passive
self.connection = connection
示例6: __init__
# 需要導入模塊: from vlcp.event.runnable import RoutineContainer [as 別名]
# 或者: from vlcp.event.runnable.RoutineContainer import __init__ [as 別名]
def __init__(self, client, scheduler=None, daemon=False):
RoutineContainer.__init__(self, scheduler=scheduler, daemon=daemon)
self.client = client