File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -216,8 +216,7 @@ naturally:
216216:func: `py::mod_gil_not_used() `,
217217:func: `py::multiple_interpreters::per_interpreter_gil() `, and
218218:func: `py::multiple_interpreters::shared_gil() ` tags just like ``PYBIND11_MODULE ``.
219- See the multiple interpreters and free-threading sections of the pybind11 docs for
220- more information.
219+ See :ref: `misc_subinterp ` and :ref: `misc_free_threading ` for more information.
221220
222221
223222Interpreter lifetime
@@ -249,8 +248,8 @@ global data. All the details can be found in the CPython documentation.
249248
250249.. _subinterp :
251250
252- Sub-interpreter support
253- =======================
251+ Embedding Sub-interpreters
252+ ==========================
254253
255254A sub-interpreter is a separate interpreter instance which provides a
256255separate, isolated interpreter environment within the same process as the main
@@ -418,3 +417,5 @@ Best Practices for sub-interpreter safety:
418417- When using multiple threads to run independent sub-interpreters, the independent GILs allow
419418 concurrent calls from different interpreters into the same C++ code from different threads.
420419 So you must still consider the thread safety of your C++ code.
420+
421+ - Familiarize yourself with :ref: `misc_concurrency `.
Original file line number Diff line number Diff line change @@ -155,6 +155,8 @@ following checklist.
155155 within pybind11 that will throw exceptions on certain GIL handling errors
156156 (reference counting operations).
157157
158+ .. _misc_free_threading :
159+
158160Free-threading support
159161==================================================================
160162
@@ -178,6 +180,8 @@ your code is thread safe. Modules must still be built against the Python free-t
178180enable free-threading, even if they specify this tag. Adding this tag does not break
179181compatibility with non-free-threaded Python.
180182
183+ .. _misc_subinterp :
184+
181185Sub-interpreter support
182186==================================================================
183187
@@ -224,6 +228,8 @@ You can explicitly disable sub-interpreter support in your module by using the
224228:func: `multiple_interpreters::not_supported() ` tag. This is the default behavior if you do not
225229specify a multiple_interpreters tag.
226230
231+ .. _misc_concurrency :
232+
227233Concurrency and Parallelism in Python with pybind11
228234===================================================
229235
You can’t perform that action at this time.
0 commit comments