Пример #1
0
 def __init__(self, queue_size=DEFAULT_QUEUE_SIZE):
     # type: (int) -> None
     check_thread_support()
     self._queue = Queue(queue_size)  # type: Queue
     self._lock = threading.Lock()
     self._thread = None  # type: Optional[threading.Thread]
     self._thread_for_pid = None  # type: Optional[int]
Пример #2
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]
Пример #3
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]
Пример #4
0
 def __init__(self):
     check_thread_support()
     self._queue = queue.Queue(-1)
     self._lock = threading.Lock()
     self._thread = None
     self._thread_for_pid = None