submit_batch()
Submit one task per zero-arg callable in fns in one call.
Usage
submit_batch(
fns,
*,
timeout=None,
)Parameters
fns: _Iterable[_Callable[[], _Any]]-
Zero-arg callables, one task each. Use
functools.partialto bind arguments. timeout: float | None = None- Seconds to wait for queue space; None waits indefinitely.
Returns
A list ofTaskhandles. If the queue stays full-
past
timeoutthe batch ends short, and the returned handles stay valid and collectible. A mid-batch failure raises with anacceptedattribute holding the handles already submitted, which stay valid and collectible.
Raises
ConcurrentUseError- Another submit-family verb is in flight on this handle from a second thread: a pool handle is single-producer (the class docstring).