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

wait for or cancel running asyncio tasks in an event emitter #168

Merged
merged 12 commits into from
Nov 16, 2024

Conversation

jfhbrook
Copy link
Owner

This PR builds off #167:

  • Rename methods to wait_for_complete, cancel and complete
  • Adds full docstrings with examples to these new methods
  • Adds test coverage for these new methods
  • Separates twisted and asyncio tests. Twisted and asyncio tests were mixed in ./tests/test_async.py because a prior iteration of this library supported both in the same event emitter abstraction. Now ./tests/test_async.py has been renamed to ./tests/test_asyncio.py and Twisted tests have been moved into ./tests/test_twisted.py with the other Twisted tests
  • Added @xiaoshuai to CONTRIBUTORS.md

I also investigated adding analogous features to other event emitters, but I don't think the other supported frameworks quite have the same execution/cancelation model as asyncio - certainly none of them hold explicit references to their futures.

@jfhbrook jfhbrook mentioned this pull request Nov 16, 2024
@jfhbrook jfhbrook force-pushed the asyncio-wait-cancel branch from b0e228e to 6b54580 Compare November 16, 2024 20:26
@jfhbrook jfhbrook merged commit 86be7b4 into main Nov 16, 2024
8 checks passed
@jfhbrook jfhbrook deleted the asyncio-wait-cancel branch November 16, 2024 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants