Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
gh-112050: Make collections.deque thread-safe in free-threaded builds#113830
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
mpage commented Jan 8, 2024 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Convert most methods on collections.deque to use clinic. This will allow us to use clinic's `@critical_section` directive when making deques thread-safe for `--gil-disabled`, simplifying the implementation.
Clear is used only by the GC; no other threads are running.
erlend-aasland commented Feb 1, 2024
Great; let's wait with landing this until we've got those. |
mpage commented Feb 2, 2024
@erlend-aasland Here are some benchmark numbers using the default
|
Uh oh!
There was an error while loading. Please reload this page.
mpage commented Feb 14, 2024
@erlend-aasland - I think everything is addressed now. Would you please have another look? |
erlend-aasland left a comment
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.
Thanks!
erlend-aasland commented Feb 14, 2024
I'm inclined to run the buildbots on this; Thomas is cooking up the release right now, so we really don't want one of the bots to turn red right now. |
bedevere-bot commented Feb 14, 2024
🤖 New build scheduled with the buildbot fleet by @erlend-aasland for commit 6ffad44 🤖 If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
mpage commented Feb 14, 2024
@erlend-aasland - Just noticed one last place where we want to use the macro wrapper. Would you please kick off another buildbot run. Sorry for the churn. |
AlexWaygood commented Feb 14, 2024
You should be able to trigger the buildbot run yourself, now you're a triager! :) |
bedevere-bot commented Feb 14, 2024
mpage commented Feb 14, 2024
Oho - I'm drunk with power now! :P |
corona10 left a comment
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
This uses critical sections to make
dequemethods that operate on mutable state thread-safe when the GIL is disabled. This is mostly accomplished by using the@critical_sectionclinic directive, though there are a few places where this was not possible and critical sections had to be manually acquired/released.--disable-gilbuilds #112050