FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-45997: Fix asyncio.Semaphore waiters order by hyzyla · Pull Request #30052 · python/cpython · GitHub

/ cpython Public

bpo-45997: Fix asyncio.Semaphore waiters order - #30052

Closed
hyzyla wants to merge 1 commit into
python:mainfrom
hyzyla:add-asyncio-semaphore-order
Closed

hyzyla wants to merge 1 commit into
python:mainfrom
hyzyla:add-asyncio-semaphore-order

Conversation

hyzyla commented Dec 11, 2021 •
edited by bedevere-bot
Loading

Copy link
Copy Markdown

Allow other Semaphore waiters to acquire lock after releasing by current coroutine by skipping one event loop iteration. If everything is OK for Semaphore, I can add the same logic to other asyncio synchronization primitives

https://bugs.python.org/issue45997

hyzyla requested review from 1st1 and asvetlov as code owners December 11, 2021 14:42

Copy link
Copy Markdown

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

Recognized GitHub username

We couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames:

@hyzyla

This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

asvetlov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The PR adds unconditional sleep even if the waiting is not needed (the context was switched already).
I think we need an alternative implementation based on future object waiting.

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

github-actions Bot added the stale Stale PR or inactive for long period of time. label Jan 14, 2022

taleinat commented Jan 18, 2022 •
edited
Loading

Copy link
Copy Markdown
Contributor

@hyzyla, are you interested in continuing to work on this PR following @asvetlov's comment?

(If so, you will need to to sign the CLA.)

github-actions Bot removed the stale Stale PR or inactive for long period of time. label Jan 19, 2022

hyzyla commented Jan 19, 2022

Copy link
Copy Markdown
Author

I would like to return to PR in few weeks, I have idea where I will create Future, then will put it to loop via call_soon and in the end in acquire method waiting for that Future

Copy link
Copy Markdown
Contributor

Alright @hyzyla, looking forward to what you'll come up with!

Copy link
Copy Markdown
Contributor

#31910 is an alternative fix

Copy link
Copy Markdown
Contributor

Thanks for the PR!
Fixed by #31910

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL