# uproot.source.futures.ResourceWorker

Defined in uproot.source.futures on line 324.

Inheritance order:
uproot.source.futures.Worker `threading.Thread`

class uproot.source.futures.ResourceWorker(work_queue: Queue, resource)
  Parameters:

    work_queue (`queue.Queue`) – The worker calls `get` on this queue for tasks in the form of uproot.source.futures.Future objects and runs them. If it ever gets a None value, the thread is stopped.

  A uproot.source.futures.Worker that is bound to a uproot.source.chunk.Resource. This resource is the first argument passed to each uproot.source.futures.ResourceFuture that it executes.

## resource

ResourceWorker.resource

  The uproot.source.chunk.Resource that is bound to this worker.

## work_queue

Inherited from uproot.source.futures.Worker.

ResourceWorker.work_queue

  The worker calls `get` on this queue for tasks in the form of uproot.source.futures.Future objects and runs them. If it ever gets a None value, the thread is stopped.

## run

Inherited from uproot.source.futures.Worker.

ResourceWorker.run()

  Listens to the work_queue and executes each uproot.source.futures.ResourceFuture it receives (with resource as its first argument) until it receives None.