Ejemplo n.º 1
0
 def __init__(self):
     # type: () -> None
     check_thread_support()
     self._queue = queue.Queue(-1)  # type: Queue[Any]
     self._lock = Lock()
     self._thread = None  # type: Optional[Thread]
     self._thread_for_pid = None  # type: Optional[int]
Ejemplo n.º 2
0
    def __init__(self,
                 options=None
                 ):  #enchance: set the max queue size for the message quque
        # type: () -> None
        check_thread_support()

        max_q_len = -1
        if options:
            max_q_len = options.get('qmaxsize', -1)

        self._queue = queue.Queue(max_q_len)  # type: Queue[Any]
        self._lock = Lock()
        self._thread = None  # type: Optional[Thread]
        self._thread_for_pid = None  # type: Optional[int]
Ejemplo n.º 3
0
 def __init__(self):
     check_thread_support()
     self._queue = queue.Queue(-1)
     self._lock = threading.Lock()
     self._thread = None
     self._thread_for_pid = None