-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Closed
Labels
3.13bugs and security fixesbugs and security fixesextension-modulesC modules in the Modules dirC modules in the Modules dirtopic-free-threadingtype-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
The collections.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 from nogil-3.12
: colesbury/nogil-3.12@f1e4742eaa. That implementation did not use the critical section API, which made it more complicated.
Depends on: #111903
Linked PRs
erlend-aasland
Metadata
Metadata
Labels
3.13bugs and security fixesbugs and security fixesextension-modulesC modules in the Modules dirC modules in the Modules dirtopic-free-threadingtype-featureA feature request or enhancementA feature request or enhancement