Skip to content

Make multiprocessing.Queue a subclass of queue.Queue #1525

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 8, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions stdlib/3/multiprocessing/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# Stubs for multiprocessing

from typing import Any, Callable, Iterable, Mapping, Optional, Dict, List, Union
from typing import Any, Callable, Iterable, Mapping, Optional, Dict, List, Union, TypeVar

from logging import Logger
from multiprocessing.context import BaseContext
from multiprocessing.managers import SyncManager
from multiprocessing.pool import AsyncResult
from multiprocessing.process import current_process as current_process
import sys
import queue

_T = TypeVar('_T')

class Lock():
def acquire(self, block: bool = ..., timeout: int = ...) -> None: ...
Expand Down Expand Up @@ -93,15 +96,15 @@ class Process():
def is_alive(self) -> bool: ...
def join(self, timeout: Optional[float] = ...) -> None: ...

class Queue():
class Queue(queue.Queue[_T]):
def __init__(self, maxsize: int = ...) -> None: ...
def get(self, block: bool = ..., timeout: float = ...) -> Any: ...
def put(self, item: Any, block: bool = ..., timeout: float = ...) -> None: ...
def get(self, block: bool = ..., timeout: Optional[float] = ...) -> _T: ...
def put(self, item: _T, block: bool = ..., timeout: Optional[float] = ...) -> None: ...
def qsize(self) -> int: ...
def empty(self) -> bool: ...
def full(self) -> bool: ...
def put_nowait(self, item: Any) -> None: ...
def get_nowait(self) -> Any: ...
def put_nowait(self, item: _T) -> None: ...
def get_nowait(self) -> _T: ...
def close(self) -> None: ...
def join_thread(self) -> None: ...
def cancel_join_thread(self) -> None: ...
Expand Down