Adds Event stub to multiprocessing (#1247)

* Adds Event type to multiprocessing

* Add event and context stub to multiprocessing stub.  Updates per recommendations.

* Adding missing newline at EOF.

* Stubbing just BaseContext and not any of the member functions.

* Fix flake8 extra line.

* Fix comment.

* Add todo for BaseContext, make ctx of Any type, and remove multiprocessing.context
This commit is contained in:
Mahmoud Afaneh
2017-05-10 07:20:19 -07:00
committed by Jelle Zijlstra
parent 8d1114c0c3
commit 30283aa670

View File

@@ -14,6 +14,14 @@ class AsyncResult():
def ready(self) -> bool: ...
def successful(self) -> bool: ...
class Event(object):
# TODO: change ctx to BaseContext once a stub exists for multiprocessing.context
def __init__(self, *, ctx: Any) -> None: ...
def is_set(self) -> bool: ...
def set(self) -> None: ...
def clear(self) -> None: ...
def wait(self, timeout: Optional[int] = None) -> bool: ...
class Pool():
def __init__(self, processes: Optional[int] = None,
initializer: Optional[Callable[..., None]] = None,