Skip to content

Commit

Permalink
update async doc with example on .compute() vs client.compute() (#4137)
Browse files Browse the repository at this point in the history
  • Loading branch information
quasiben authored Sep 29, 2020
1 parent b2f594e commit 13098e1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/source/asynchronous.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@ function to run the asynchronous function:
client.sync(f)
.. note: Blocking operations like the .compute() method aren’t ok to use in
asynchronous mode. Instead you’ll have to use the Client.compute
method
.. code-block:: python
async with Client(asynchronous=True) as client:
arr = da.random.random((1000, 1000), chunks=(1000, 100))
await client.compute(arr.mean())
Example
-------

Expand Down

0 comments on commit 13098e1

Please sign in to comment.