1 from typing import Any, Generic, Optional, TypeVar
\r
7 class Queue(queue.Queue[_T]):
\r
8 # FIXME: `ctx` is a circular dependency and it's not actually optional.
\r
9 # It's marked as such to be able to use the generic Queue in __init__.pyi.
\r
10 def __init__(self, maxsize: int = ..., *, ctx: Any = ...) -> None: ...
\r
11 def get(self, block: bool = ..., timeout: Optional[float] = ...) -> _T: ...
\r
12 def put(self, obj: _T, block: bool = ..., timeout: Optional[float] = ...) -> None: ...
\r
13 def qsize(self) -> int: ...
\r
14 def empty(self) -> bool: ...
\r
15 def full(self) -> bool: ...
\r
16 def put_nowait(self, item: _T) -> None: ...
\r
17 def get_nowait(self) -> _T: ...
\r
18 def close(self) -> None: ...
\r
19 def join_thread(self) -> None: ...
\r
20 def cancel_join_thread(self) -> None: ...
\r
22 class JoinableQueue(Queue[_T]):
\r
23 def task_done(self) -> None: ...
\r
24 def join(self) -> None: ...
\r
26 class SimpleQueue(Generic[_T]):
\r
27 def __init__(self, *, ctx: Any = ...) -> None: ...
\r
28 def empty(self) -> bool: ...
\r
29 def get(self) -> _T: ...
\r
30 def put(self, item: _T) -> None: ...
\r