Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Feature or enhancement
Thecollections.deque object has mutable internal state that would not be thread-safe without the GIL. We should use the critical section API to make it thread-safe. I think it might be cleanest to first convert most of the deque implementation to Argument Clinic and use the@critical_section directive rather than writing the critical sections manually.
Mostly for my own reference, here is the implementation fromnogil-3.12:colesbury/nogil-3.12@f1e4742eaa. That implementation did not use the critical section API, which made it more complicated.
Depends on:#111903