uproot.source.futures.ResourceThreadPoolExecutor

Defined in uproot.source.futures on line 367.

Inheritance order:

  1. uproot.ThreadPoolExecutor

  2. uproot.source.futures.Executor

  3. abc.ABC

class uproot.source.futures.ResourceThreadPoolExecutor(resources)
Parameters:

resources (list of uproot.source.chunk.Resource) – Resources to wrap as uproot.source.futures.ResourceFuture objects.

A uproot.ThreadPoolExecutor whose workers are bound to resources, such as file handles.

close

ResourceThreadPoolExecutor.close()

Stops all uproot.source.futures.ResourceWorker threads and frees their resource.

max_workers

Inherited from uproot.ThreadPoolExecutor.

ResourceThreadPoolExecutor.max_workers

The maximum number of workers.

num_workers

Inherited from uproot.ThreadPoolExecutor.

ResourceThreadPoolExecutor.num_workers

The number of workers.

workers

Inherited from uproot.ThreadPoolExecutor.

ResourceThreadPoolExecutor.workers

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

submit

Inherited from uproot.source.futures.Executor.

ResourceThreadPoolExecutor.submit(future: ResourceFuture) ResourceFuture

Pass the task onto the workers’ work_queue as a uproot.source.futures.ResourceFuture so that it will be executed with its resource when that worker is available.

shutdown

Inherited from uproot.source.futures.Executor.

ResourceThreadPoolExecutor.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.

ResourceThreadPoolExecutor.closed

True if the uproot.source.futures.ResourceWorker threads have been stopped and their resource freed.