MCPcopy Create free account
hub / github.com/dask/dask / __await__

Method __await__

dask/base.py:376–389  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

374 return result
375
376 def __await__(self):
377 try:
378 from distributed import futures_of, wait
379 except ImportError as e:
380 raise ImportError(
381 "Using async/await with dask requires the `distributed` package"
382 ) from e
383
384 async def f():
385 if futures_of(self):
386 await wait(self)
387 return self
388
389 return f().__await__()
390
391
392def compute_as_if_collection(cls, dsk, keys, scheduler=None, get=None, **kwargs):

Callers

nothing calls this directly

Calls 1

fFunction · 0.50

Tested by

no test coverage detected