uproot.source.futures.ResourceThreadPoolExecutor — Uproot documentation

# uproot.source.futures.ResourceThreadPoolExecutor

Defined in uproot.source.futures on line 331.

Inheritance order:
uproot.ThreadPoolExecutor

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.

## closed

ResourceThreadPoolExecutor.closed

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

## 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.ThreadPoolExecutor.

ResourceThreadPoolExecutor.submit(future)

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

ResourceThreadPoolExecutor.shutdown(wait=True)

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