distributed 2021.10.0

ParametersBackRef

This allows multiple clients to share futures or small bits of data between each other with a multi-producer/multi-consumer queue. All metadata is sequentialized through the scheduler.

Elements of the Queue must be either Futures or msgpack-encodable data (ints, strings, lists, dicts). All data is sent through the scheduler so it is wise not to send large objects. To share large objects scatter the data and share the future instead.

warning

This object is experimental

Parameters

name: string (optional) :

Name used by other clients and the scheduler to identify the queue. If not given, a random name will be generated.

client: Client (optional) :

Client used for communication with the scheduler. If not given, the default global client will be used.

maxsize: int (optional) :

Number of items allowed in the queue. If 0 (the default), the queue size is unbounded.

Distributed Queue

See Also

Variable

shared variable between clients

Examples

This example is valid syntax, but we were not able to check execution
>>> from dask.distributed import Client, Queue  # doctest: +SKIP
... client = Client() # doctest: +SKIP
... queue = Queue('x') # doctest: +SKIP
... future = client.submit(f, x) # doctest: +SKIP
... queue.put(future) # doctest: +SKIP
See :

Back References

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

distributed.queues.Queue

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/queues.py#130
type: <class 'type'>
Commit: