-
Notifications
You must be signed in to change notification settings - Fork 71
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
Add tests of asyncio.Lock and asyncio.Semaphore usage #567
base: main
Are you sure you want to change the base?
Conversation
87fc797
to
390ee94
Compare
390ee94
to
6eb176a
Compare
94d0d38
to
2e68dad
Compare
if seen_completion: | ||
self._warn_if_unfinished_handlers() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this removed intentionally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, sorry I pushed a temp commit for the cancellation sample I sent you earlier, to force push over later. Force-pushed now.
2a3a9c3
to
6eb176a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM, granted I apply very little scrutiny to test code
0549ac8
to
a524593
Compare
a524593
to
72fdcc1
Compare
72fdcc1
to
1322b5a
Compare
Fixes #554
Add tests confirming that
asyncio.Lock
andasyncio.Semaphore
can be used in workflow code to control concurrency of coroutines (tasks spawned by the main coroutine, and update handlers).The fact that these tests pass largely follows from the fact that our event loop implementation has functioning implementations of
call_later()
call_soon()
, so these tests could alternatively be moved into thefeatures
repo, as part of a feature test confirming that all languages have mutex/semaphore primitives that can be used for this sort of workflow concurrency control.