Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions docs/source/dask.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,23 @@ did.
``source.emit``.

.. _Dask: https://dask.pydata.org/en/latest/


Gotchas
+++++++


An important gotcha with ``DaskStream`` is that it is a subclass ``Stream``, and so can be used as an input
to any function expecting a ``Stream``. If there is no intervening ``.gather()``, then the downstream node will
receive Dask futures instead of the data they represent::

source = Stream()
source2 = Stream()
a = source.scatter().map(inc)
b = source2.combine_latest(a)

In this case, the combine operation will get real values from ``source2``, and Dask futures.
Downstream nodes would be free to operate on the futures, but more likely, the line should be::

b = source2.combine_latest(a.gather())