@@ -25,84 +25,84 @@ class task:
2525 """
2626 @t .overload
2727 def __new__ (
28- cls ,
29- func : None = None ,
30- / ,
31- * ,
32- join : bool = False ,
33- concurrency : int = 1 ,
34- throttle : int = 0 ,
35- daemon : bool = False ,
36- bind : _ArgsKwargs = None
37- ) -> t .Type [task ]: ...
28+ cls ,
29+ func : None = None ,
30+ / ,
31+ * ,
32+ join : bool = False ,
33+ concurrency : int = 1 ,
34+ throttle : int = 0 ,
35+ daemon : bool = False ,
36+ multiprocess : bool = False ,
37+ bind : _ArgsKwargs = None ) -> t .Type [task ]: ...
3838
3939 @t .overload
4040 def __new__ (
41- cls ,
42- func : t .Callable [_P , t .Awaitable [_R ]],
43- / ,
44- * ,
45- join : bool = False ,
46- concurrency : int = 1 ,
47- throttle : int = 0 ,
48- daemon : bool = False ,
49- bind : _ArgsKwargs = None
50- ) -> AsyncPipeline [_P , _R ]: ...
41+ cls ,
42+ func : t .Callable [_P , t .Awaitable [_R ]],
43+ / ,
44+ * ,
45+ join : bool = False ,
46+ concurrency : int = 1 ,
47+ throttle : int = 0 ,
48+ daemon : bool = False ,
49+ multiprocess : bool = False ,
50+ bind : _ArgsKwargs = None ) -> AsyncPipeline [_P , _R ]: ...
5151
5252 @t .overload
5353 def __new__ (
54- cls ,
55- func : t .Callable [_P , t .AsyncGenerator [_R ]],
56- / ,
57- * ,
58- join : bool = False ,
59- concurrency : int = 1 ,
60- throttle : int = 0 ,
61- daemon : bool = False ,
62- bind : _ArgsKwargs = None
63- ) -> AsyncPipeline [_P , _R ]: ...
64-
54+ cls ,
55+ func : t .Callable [_P , t .AsyncGenerator [_R ]],
56+ / ,
57+ * ,
58+ join : bool = False ,
59+ concurrency : int = 1 ,
60+ throttle : int = 0 ,
61+ daemon : bool = False ,
62+ multiprocess : bool = False ,
63+ bind : _ArgsKwargs = None ) -> AsyncPipeline [_P , _R ]: ...
64+
6565 @t .overload
6666 def __new__ (
67- cls ,
68- func : t .Callable [_P , t .Generator [_R ]],
69- / ,
70- * ,
71- join : bool = False ,
72- concurrency : int = 1 ,
73- throttle : int = 0 ,
74- daemon : bool = False ,
75- bind : _ArgsKwargs = None
76- ) -> Pipeline [_P , _R ]: ...
67+ cls ,
68+ func : t .Callable [_P , t .Generator [_R ]],
69+ / ,
70+ * ,
71+ join : bool = False ,
72+ concurrency : int = 1 ,
73+ throttle : int = 0 ,
74+ daemon : bool = False ,
75+ multiprocess : bool = False ,
76+ bind : _ArgsKwargs = None ) -> Pipeline [_P , _R ]: ...
7777
7878 @t .overload
7979 def __new__ (
80- cls ,
81- func : t .Callable [_P , _R ],
82- / ,
83- * ,
84- join : bool = False ,
85- concurrency : int = 1 ,
86- throttle : int = 0 ,
87- daemon : bool = False ,
88- bind : _ArgsKwargs = None
89- ) -> Pipeline [_P , _R ]: ...
80+ cls ,
81+ func : t .Callable [_P , _R ],
82+ / ,
83+ * ,
84+ join : bool = False ,
85+ concurrency : int = 1 ,
86+ throttle : int = 0 ,
87+ daemon : bool = False ,
88+ multiprocess : bool = False ,
89+ bind : _ArgsKwargs = None ) -> Pipeline [_P , _R ]: ...
9090
9191 def __new__ (
92- cls ,
93- func : t .Optional [t .Callable ] = None ,
94- / ,
95- * ,
96- join : bool = False ,
97- concurrency : int = 1 ,
98- throttle : int = 0 ,
99- daemon : bool = False ,
100- bind : _ArgsKwargs = None
101- ):
92+ cls ,
93+ func : t .Optional [t .Callable ] = None ,
94+ / ,
95+ * ,
96+ join : bool = False ,
97+ concurrency : int = 1 ,
98+ throttle : int = 0 ,
99+ daemon : bool = False ,
100+ multiprocess : bool = False ,
101+ bind : _ArgsKwargs = None ):
102102 # Classic decorator trick: @task() means func is None, @task without parentheses means func is passed.
103103 if func is None :
104- return functools .partial (cls , join = join , concurrency = concurrency , throttle = throttle , daemon = daemon , bind = bind )
105- return Pipeline ([Task (func = func , join = join , concurrency = concurrency , throttle = throttle , daemon = daemon , bind = bind )])
104+ return functools .partial (cls , join = join , concurrency = concurrency , throttle = throttle , daemon = daemon , multiprocess = multiprocess , bind = bind )
105+ return Pipeline ([Task (func = func , join = join , concurrency = concurrency , throttle = throttle , daemon = daemon , multiprocess = multiprocess , bind = bind )])
106106
107107 @staticmethod
108108 def bind (* args , ** kwargs ) -> _ArgsKwargs :
0 commit comments