distributed 2021.10.0

ParametersBackRef

A Future is a local proxy to a result running on a remote worker. A user manages future objects in the local Python process to determine what happens in the larger cluster.

Parameters

key: str, or tuple :

Key of remote data to which this future refers

client: Client :

Client that should own this future. Defaults to _get_global_client()

inform: bool :

Do we inform the scheduler that we need an update on this future

A remotely running computation

See Also

Client

Creates futures

Examples

Futures typically emerge from Client computations

This example is valid syntax, but we were not able to check execution
>>> my_future = client.submit(add, 1, 2)  # doctest: +SKIP

We can track the progress and results of a future

This example is valid syntax, but we were not able to check execution
>>> my_future  # doctest: +SKIP
<Future: status: finished, key: add-8f6e709446674bad78ea8aeecfee188e>

We can get the result or the exception and traceback from the future

This example is valid syntax, but we were not able to check execution
>>> my_future.result()  # doctest: +SKIP
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

distributed.variable.Variable distributed.actor.Actor distributed.client.Client distributed.queues.Queue distributed.client.Client.gather

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /distributed/client.py#139
type: <class 'type'>
Commit: