mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-20 06:49:25 +00:00
Re-enable Move Subinterpreter test for free-threaded Python 3.14 (#5940)
* Remove skip for Move Subinterpreter test on free-threaded Python 3.14+ * Fix deadlock by detaching from the main interpreter before joining the thread. * style: pre-commit fixes --------- Co-authored-by: b-pass <b-pass@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
7ae61bfb82
commit
799f591ec3
@@ -492,4 +492,8 @@ Best Practices for sub-interpreter safety
|
||||
So you must still consider the thread safety of your C++ code. Remember, in Python 3.12
|
||||
sub-interpreters must be destroyed on the same thread that they were created on.
|
||||
|
||||
- When using sub-interpreters in free-threaded python builds, note that creating and destroying
|
||||
sub-interpreters may initiate a "stop-the-world". Be sure to detach long-running C++ threads
|
||||
from Python thread state (similar to releasing the GIL) to avoid deadlocks.
|
||||
|
||||
- Familiarize yourself with :ref:`misc_concurrency`.
|
||||
|
||||
Reference in New Issue
Block a user