Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation #713

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ Example
fut = loop.run_in_executor(None, threaded, queue.sync_q)
await async_coro(queue.async_q)
await fut
queue.close()
await queue.wait_closed()
await queue.aclose()


asyncio.run(main())
Expand All @@ -83,16 +82,16 @@ This library is built using a classic thread-safe design. The design is
time-tested, but has some limitations.

* Once you are done working with a queue, you must properly close it using
``close()`` and ``wait_closed()``. This is because this library creates new
tasks to notify other threads. If you do not properly close the queue,
``aclose()``. This is because this library creates new tasks to notify other
threads. If you do not properly close the queue,
`asyncio may generate error messages
<https://github.com/aio-libs/janus/issues/574>`_.
* The library has acceptable performance only when used as intended, that is,
for communication between synchronous code and asynchronous one.
For sync-only and async-only cases, use queues from
`queue <https://docs.python.org/3/library/queue.html>`_ and
`asyncio <https://docs.python.org/3/library/asyncio-queue.html>`_ modules,
otherwise `the slowdown will be significant
otherwise `the slowdown can be significant
<https://github.com/aio-libs/janus/issues/419>`_.
* You cannot use queues for communicating between two different event loops
because, like all asyncio primitives, they bind to the current one.
Expand Down
Loading