uproot.ThreadPoolExecutor

Defined in uproot.source.futures on line 198.

Inheritance order:

  1. uproot.source.futures.Executor

  2. abc.ABC

class uproot.source.futures.ThreadPoolExecutor(max_workers: int | None = None)
Parameters:
  • max_workers (None or int) – The maximum number of workers to start.

  • workers. (In the current implementation this is exactly the number of) –

  • None (If) –

  • os.cpu_count(). (use) –

Like Python 3 concurrent.futures.ThreadPoolExecutor except that it has only the subset of the interface Uproot needs and is available in Python 2.

The uproot.source.futures.ResourceThreadPoolExecutor extends this class.

max_workers

ThreadPoolExecutor.max_workers

The maximum number of workers.

num_workers

ThreadPoolExecutor.num_workers

The number of workers.

workers

ThreadPoolExecutor.workers

A list of workers (uproot.source.futures.Worker).

submit

Inherited from uproot.source.futures.Executor.

ThreadPoolExecutor.submit(task, /, *args, **kwargs)

Pass the task and args onto the workers’ work_queue as a uproot.source.futures.Future so that it will be executed when one is available.

shutdown

Inherited from uproot.source.futures.Executor.

ThreadPoolExecutor.shutdown(wait: bool = True)

Stop every uproot.source.futures.Worker by putting None on the work_queue until none of them satisfy worker.is_alive().

closed

Inherited from uproot.source.futures.Executor.

ThreadPoolExecutor.closed

True if the executor has been stopped and its resources freed.