mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-26 05:41:11 +08:00
29
stdlib/2/Queue.pyi
Normal file
29
stdlib/2/Queue.pyi
Normal file
@@ -0,0 +1,29 @@
|
||||
# Stubs for Queue (Python 2)
|
||||
|
||||
from typing import Any, TypeVar, Generic
|
||||
|
||||
_T = TypeVar('_T')
|
||||
|
||||
class Empty(Exception): ...
|
||||
class Full(Exception): ...
|
||||
|
||||
class Queue(Generic[_T]):
|
||||
maxsize = ... # type: Any
|
||||
mutex = ... # type: Any
|
||||
not_empty = ... # type: Any
|
||||
not_full = ... # type: Any
|
||||
all_tasks_done = ... # type: Any
|
||||
unfinished_tasks = ... # type: Any
|
||||
def __init__(self, maxsize: int = ...) -> None: ...
|
||||
def task_done(self) -> None: ...
|
||||
def join(self) -> None: ...
|
||||
def qsize(self) -> int: ...
|
||||
def empty(self) -> bool: ...
|
||||
def full(self) -> bool: ...
|
||||
def put(self, item: _T, block: bool = ..., timeout: float = ...) -> None: ...
|
||||
def put_nowait(self, item: _T) -> None: ...
|
||||
def get(self, block: bool = ..., timeout: float = ...) -> _T: ...
|
||||
def get_nowait(self) -> _T: ...
|
||||
|
||||
class PriorityQueue(Queue): ...
|
||||
class LifoQueue(Queue): ...
|
||||
Reference in New Issue
Block a user