File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -216,8 +216,7 @@ naturally:
216
216
:func: `py::mod_gil_not_used() `,
217
217
:func: `py::multiple_interpreters::per_interpreter_gil() `, and
218
218
: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.
221
220
222
221
223
222
Interpreter lifetime
@@ -249,8 +248,8 @@ global data. All the details can be found in the CPython documentation.
249
248
250
249
.. _subinterp :
251
250
252
- Sub-interpreter support
253
- =======================
251
+ Embedding Sub-interpreters
252
+ ==========================
254
253
255
254
A sub-interpreter is a separate interpreter instance which provides a
256
255
separate, isolated interpreter environment within the same process as the main
@@ -418,3 +417,5 @@ Best Practices for sub-interpreter safety:
418
417
- When using multiple threads to run independent sub-interpreters, the independent GILs allow
419
418
concurrent calls from different interpreters into the same C++ code from different threads.
420
419
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.
155
155
within pybind11 that will throw exceptions on certain GIL handling errors
156
156
(reference counting operations).
157
157
158
+ .. _misc_free_threading :
159
+
158
160
Free-threading support
159
161
==================================================================
160
162
@@ -178,6 +180,8 @@ your code is thread safe. Modules must still be built against the Python free-t
178
180
enable free-threading, even if they specify this tag. Adding this tag does not break
179
181
compatibility with non-free-threaded Python.
180
182
183
+ .. _misc_subinterp :
184
+
181
185
Sub-interpreter support
182
186
==================================================================
183
187
@@ -224,6 +228,8 @@ You can explicitly disable sub-interpreter support in your module by using the
224
228
:func: `multiple_interpreters::not_supported() ` tag. This is the default behavior if you do not
225
229
specify a multiple_interpreters tag.
226
230
231
+ .. _misc_concurrency :
232
+
227
233
Concurrency and Parallelism in Python with pybind11
228
234
===================================================
229
235
You can’t perform that action at this time.
0 commit comments