Beispiel #1
0
Datei: hub.py Projekt: HVF/gevent
 def __init__(self, loop=None, default=None):
     greenlet.__init__(self)
     if hasattr(loop, 'run'):
         if default is not None:
             raise TypeError("Unexpected argument: default")
         self.loop = loop
     else:
         if default is None:
             default = get_ident() == MAIN_THREAD
         loop_class = _import(self.loop_class)
         if loop is None:
             loop = self.backend
         self.loop = loop_class(flags=loop, default=default)
     self._resolver = None
     self._threadpool = None
     self.format_context = _import(self.format_context)
Beispiel #2
0
 def __init__(self, loop=None, default=None):
     greenlet.__init__(self)
     if hasattr(loop, 'run'):
         if default is not None:
             raise TypeError("Unexpected argument: default")
         self.loop = loop
     else:
         if default is None:
             default = get_ident() == MAIN_THREAD
         loop_class = _import(self.loop_class)
         if loop is None:
             loop = self.backend
         self.loop = loop_class(flags=loop, default=default)
     self._resolver = None
     self._threadpool = None
     self.format_context = _import(self.format_context)
Beispiel #3
0
 def __init__(self):
     greenlet.__init__(self)
     self.keyboard_interrupt_signal = None
Beispiel #4
0
 def __init__(self):
     greenlet.__init__(self)
     self.keyboard_interrupt_signal = None
     self.waker = None
     self.callqueue = []
Beispiel #5
0
 def __init__(self):
     greenlet.__init__(self)
     self.keyboard_interrupt_signal = None