- 
                Notifications
    
You must be signed in to change notification settings  - Fork 31
 
Open
Description
From a quick look it seems like the main issue will be synchronizing access to the Pool state. So perhaps:
- A per-instance 
std::mutex(fromlibcpp.mutex) within thecymem.Poolclass. allocetc. will be protected by the C++ mutex usinglock_guardandwith nogil:before acquiring the mutex (so we don't deadlock with the GIL).Pool.reallocmight need a different approach / refactor, since we can't recursively have lock acquisition.- Py_INCREF/Py_DECREF is imported by unused, might be needed for 
own_pyrefand__dealloc__. 
The standard TODOs for adding free-threading support are:
- Audit Python bindings and declare them free-threading compatible (xref https://py-free-threading.github.io/porting/#updating-extension-modules).
 -  Run the test suite with 
pytest-run-parallelto find potential issues, and fix them. - Run the test suite under ThreadSanitizer. If possible, depends on how many dependencies there are and if they run under TSan.
 -  Add 
cp313t-*to CI to build free-threading wheels. 
For more details, please see the suggested plan of attack in the py-free-threading guide.
Note that this is the first time I've looked at this repo, so I might be
missing known issues or code that needs closer inspection. Any suggestions here
will be very useful.
Let me know if I ought to hold off for any reason. One thing which is slightly concerning is that there are few in-project tests.
Metadata
Metadata
Assignees
Labels
No labels