Class Queue

Distributed Queue

Declaration

class Queue
source link

Documentation

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 and has known issues in Python 2

Attributes

Examples

>>> 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 also

Variable: shared variable between clients

Methods

Reexports