Skip to content

Commit

Permalink
Fix typo in asyncio documentation (#7602)
Browse files Browse the repository at this point in the history
  • Loading branch information
allenanswerzq authored Mar 17, 2020
1 parent c1b0f9c commit e6a045d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/source/async_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ AsyncIO / Concurrency for Actors
Since Python 3.5, it is possible to write concurrent code using the
``async/await`` `syntax <https://docs.python.org/3/library/asyncio.html>`__.
Ray natively integrates with asyncio. You can use ray alongside with popular
async frameworks like aiohttp, aioredis, etc.
async frameworks like aiohttp, aioredis, etc.

You can try it about by running the following snippet in ``ipython`` or a shell
that supports top level ``await``:
Expand All @@ -25,14 +25,14 @@ that supports top level ``await``:
print("finished")
actor = AsyncActor.remote()
# regular ray.get
ray.get([actor.run_concurrent.remote() for _ in range(4)])
# async ray.get
await actor.run_concurrent.remote()
ObjectIDs as asyncio.Futures
----------------------------
ObjectIDs can be translated to asyncio.Future. This feature
Expand Down Expand Up @@ -105,7 +105,7 @@ You can limit the number of concurrent task running at once using the
await asyncio.sleep(1) # Network, I/O task here
print("ended")
actor = AsyncActor.options(max_concurreny=10).remote()
actor = AsyncActor.options(max_concurrency=10).remote()
# Only 10 tasks will be running concurrently. Once 10 finish, the next 10 should run.
ray.get([actor.run_task.remote() for _ in range(50)])
Expand Down

0 comments on commit e6a045d

Please sign in to comment.