1
+ from typing import Optional , TypeVar
2
+
1
3
from multiprocessing .process import Process as Process , current_process as current_process , active_children as active_children
2
4
from multiprocessing .util import SUBDEBUG as SUBDEBUG , SUBWARNING as SUBWARNING
5
+ from Queue import Queue as _BaseQueue
3
6
4
7
class ProcessError (Exception ): ...
5
8
class BufferTooShort (ProcessError ): ...
6
9
class TimeoutError (ProcessError ): ...
7
10
class AuthenticationError (ProcessError ): ...
8
11
12
+ _T = TypeVar ('_T' )
13
+
14
+ class Queue (_BaseQueue [_T ]):
15
+ def __init__ (self , maxsize : int = ...) -> None : ...
16
+ def get (self , block : bool = ..., timeout : Optional [float ] = ...) -> _T : ...
17
+ def put (self , item : _T , block : bool = ..., timeout : Optional [float ] = ...) -> None : ...
18
+ def qsize (self ) -> int : ...
19
+ def empty (self ) -> bool : ...
20
+ def full (self ) -> bool : ...
21
+ def put_nowait (self , item : _T ) -> None : ...
22
+ def get_nowait (self ) -> _T : ...
23
+ def close (self ) -> None : ...
24
+ def join_thread (self ) -> None : ...
25
+ def cancel_join_thread (self ) -> None : ...
26
+
9
27
def Manager (): ...
10
28
def Pipe (duplex = True ): ...
11
29
def cpu_count () -> int : ...
@@ -19,7 +37,6 @@ def Condition(lock=None): ...
19
37
def Semaphore (value = 1 ): ...
20
38
def BoundedSemaphore (value = 1 ): ...
21
39
def Event (): ...
22
- def Queue (maxsize = 0 ): ...
23
40
def JoinableQueue (maxsize = 0 ): ...
24
41
def Pool (processes = None , initializer = None , initargs = ..., maxtasksperchild = None ): ...
25
42
def RawValue (typecode_or_type , * args ): ...
0 commit comments