MCPcopy
hub / github.com/dask/dask / _is_dask_future

Function _is_dask_future

dask/_task_spec.py:369–375  ·  view source on GitHub ↗

Check if obj is a dask Future (TaskRef or duck-typed with __dask_future__). This supports both distributed.Future (which inherits from TaskRef) and third-party scheduler futures that set __dask_future__ = True.

(obj: object)

Source from the content-addressed store, hash-verified

367
368
369def _is_dask_future(obj: object) -> bool:
370 """Check if obj is a dask Future (TaskRef or duck-typed with __dask_future__).
371
372 This supports both distributed.Future (which inherits from TaskRef) and
373 third-party scheduler futures that set __dask_future__ = True.
374 """
375 return isinstance(obj, TaskRef) or getattr(obj, "__dask_future__", False)
376
377
378class GraphNode:

Callers 3

parse_inputFunction · 0.85
convert_legacy_taskFunction · 0.85
_get_dependenciesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…