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

Method __await__

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

Source from the content-addressed store, hash-verified

393 return result
394
395 def __await__(self):
396 try:
397 from distributed import futures_of, wait
398 except ImportError as e:
399 raise type(e)(
400 "Using async/await with dask requires the `distributed` package"
401 ) from e
402
403 async def f():
404 if futures_of(self):
405 await wait(self)
406 return self
407
408 return f().__await__()
409
410
411def 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