# uproot.source.futures.ResourceFuture

Defined in [uproot.source.futures](https://github.com/scikit-hep/uproot5/blob/db953cf9827349b3d24eb6742404158c1dfd5481/src/uproot/source/futures.py) on [line 283](https://github.com/scikit-hep/uproot5/blob/db953cf9827349b3d24eb6742404158c1dfd5481/src/uproot/source/futures.py#L283).

| **Inheritance order:**                                                         |
|--------------------------------------------------------------------------------|
| 1. [uproot.source.futures.Future](uproot.source.futures.Future.html.md) |

### *class* uproot.source.futures.ResourceFuture(task)

* **Parameters:**
  **task** (*function*) – The function to evaluate with a
  [uproot.source.chunk.Resource](uproot.source.chunk.Resource.html.md) as its first argument.

A [uproot.source.futures.Future](uproot.source.futures.Future.html.md) that uses the
[uproot.source.chunk.Resource](uproot.source.chunk.Resource.html.md) associated with the
[uproot.source.futures.ResourceWorker](uproot.source.futures.ResourceWorker.html.md) that runs it.

<a id="uproot-source-futures-resourcefuture-result"></a>

## result

Inherited from [uproot.source.futures.Future](uproot.source.futures.Future.html.md).

#### ResourceFuture.result(timeout=None)

Waits until the task completes (with a `timeout`) and returns its
result.

If the task raises an exception in its background thread, this function
raises that exception on the thread on which it is called.
