uproot.ThreadPoolExecutor

Defined in uproot.source.futures on line 172.

class uproot.source.futures.ThreadPoolExecutor(num_workers=None)
Parameters:

num_workers (None or int) – The number of workers to start. If None, use os.cpu_count().

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.

num_workers

ThreadPoolExecutor.num_workers

The number of workers.

workers

ThreadPoolExecutor.workers

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

submit

ThreadPoolExecutor.submit(task, *args)

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

ThreadPoolExecutor.shutdown(wait=True)

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