Under normal operation Dask will not run any tasks for which there is not an active future (this avoids unnecessary work in many situations). However sometimes you want to just fire off a task, not track its future, and expect it to finish eventually. You can use this function on a future or collection of futures to ask Dask to complete the task even if no active client is tracking it. The results will not be kept in memory after the task completes (unless there is an active future) so this is only useful for tasks that depend on side effects.
The futures that you want to run at least once
>>> fire_and_forget(client.submit(func, *args)) # doctest: +SKIP
A possibly nested collection of Dask objects
A list of futures held by those collections
>>> futures_of(my_dask_dataframe) [<Future: finished key: ...>, <Future: pending key: ...>]
.. note:: This function should be used exclusively for unit testing the default client functionality. In all other cases, please use ``Client.as_current`` instead. .. note:: Unlike ``Client.as_current``, this context manager is neither thread-local nor task-local.
This is what default_client() will return within the with-block.
Time in seconds after which to raise a ``dask.distributed.TimeoutError``
One of `ALL_COMPLETED` or `FIRST_COMPLETED`