spdl.pipeline.PriorityExecutorEntrypoint¶
- class PriorityExecutorEntrypoint(owner: _PriorityExecutorBase, priority: int)[source]¶
Per-stage executor proxy with a fixed priority.
Drop-in compatible with
concurrent.futures.Executor. Created viaPriorityThreadPoolExecutor.get_executor()orPriorityProcessPoolExecutor.get_executor().Supports the pickle protocol: on deserialization, the first entrypoint with a given owner ID creates the owner; subsequent ones reuse it.
Methods
map(fn, *iterables[, timeout, chunksize])Returns an iterator equivalent to map(fn, iter).
shutdown([wait, cancel_futures])Clean-up the resources associated with the Executor.
submit(fn, /, *args, **kwargs)Submits a callable to be executed with the given arguments.
- submit(fn: Callable[[...], Any], /, *args: Any, **kwargs: Any) Future[Any][source]¶
Submits a callable to be executed with the given arguments.
Schedules the callable to be executed as fn(*args, **kwargs) and returns a Future instance representing the execution of the callable.
- Returns:
A Future representing the given call.