-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
gh-128002: fix many thread safety issues in asyncio #128147
Conversation
@colesbury While running the tests locally on forever mode I see frequent tsan warnings and rarely some crashes in |
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.
I'm still reading through the other locking changes, but a comment on all_tasks
below:
Filed #128421 for existing data races in traceback and frame inspection. |
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 with two comments below
Changes:
_asyncio.Task
and_asyncio.Future
thread-safe by adding critical sections_asyncio.all_tasks
thread safe when eager tasks are usedChange asyncio state lock to a mutex rather than critical section to fix re-entrancy crash, not really sure about this one