|
| 1 | +from typing import Any |
| 2 | + |
| 3 | +__all__ = ['Queue', 'PriorityQueue', 'LifoQueue', 'JoinableQueue', |
| 4 | + 'QueueFull', 'QueueEmpty'] |
| 5 | + |
| 6 | +from asyncio.events import AbstractEventLoop |
| 7 | +from .tasks import coroutine |
| 8 | + |
| 9 | + |
| 10 | +class QueueEmpty(Exception): ... |
| 11 | +class QueueFull(Exception): ... |
| 12 | + |
| 13 | + |
| 14 | +class Queue: |
| 15 | + def __init__(self, maxsize: int = 0, *, loop: AbstractEventLoop = None): ... |
| 16 | + def _init(self, maxsize: int) -> None: ... |
| 17 | + def _get(self) -> Any: ... |
| 18 | + def _put(self, item: Any) -> None: ... |
| 19 | + def __repr__(self) -> str: ... |
| 20 | + def __str__(self) -> str: ... |
| 21 | + def _format(self) -> str: ... |
| 22 | + def _consume_done_getters(self) -> None: ... |
| 23 | + def _consume_done_putters(self) -> None: ... |
| 24 | + def qsize(self) -> int: ... |
| 25 | + @property |
| 26 | + def maxsize(self) -> int: ... |
| 27 | + def empty(self) -> bool: ... |
| 28 | + def full(self) -> bool: ... |
| 29 | + @coroutine |
| 30 | + def put(self, item: Any) -> None: ... |
| 31 | + def put_nowait(self, item: Any) -> None: ... |
| 32 | + @coroutine |
| 33 | + def get(self) -> Any: ... |
| 34 | + def get_nowait(self) -> Any: ... |
| 35 | + |
| 36 | + |
| 37 | +class PriorityQueue(Queue): ... |
| 38 | + |
| 39 | + |
| 40 | +class LifoQueue(Queue): ... |
| 41 | + |
| 42 | + |
| 43 | +class JoinableQueue(Queue): |
| 44 | + def task_done(self) -> None: ... |
| 45 | + @coroutine |
| 46 | + def join(self) -> None: ... |
0 commit comments