Skip to content

Commit

Permalink
Implement .shutdown() for both sync and async APIs (#720)
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov authored Dec 13, 2024
1 parent 60f0bb3 commit a360601
Show file tree
Hide file tree
Showing 7 changed files with 497 additions and 91 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.13
- name: Cache PyPI
uses: actions/cache@v4
with:
Expand Down Expand Up @@ -157,6 +159,8 @@ jobs:
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.13
- name: Install dependencies
uses: py-actions/[email protected]
with:
Expand Down
14 changes: 14 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ Changes

.. towncrier release notes start
2.0.0 (2024-12-XX)
------------------

- Implement ``.shutdown(immediate=False)`` for both sync and async APIs #720

The change is not fully backward compatible:

1. If the queue is closed, ``janus.AsyncQueueShutDown`` and
``janus.SyncQueueShutDown`` exceptions are raised instead of ``RuntimeError``.

2. Both sync and async ``.task_done()`` and ``.join()`` don't raise any exception
on queue shutdown/closing anymore; it is compatible with shutdown behavior
of stdlib sync and async queues.


1.2.0 (2024-12-12)
------------------
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fmt:

cov: flake develop
pytest --cov=janus --cov=tests --cov-report=term --cov-report=html
@echo "open file://`pwd`/htmlcov/index.html"
@echo "open file://`pwd`/coverage/index.html"

checkrst:
python setup.py check --restructuredtext
Expand Down
Loading

0 comments on commit a360601

Please sign in to comment.