mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
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:
committed by
Jelle Zijlstra
parent
8d1114c0c3
commit
30283aa670
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user