Skip to content

Commit e5734d2

Browse files
committed
Use :ref:deadlock-reference-label
1 parent 5d0e95c commit e5734d2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/advanced/deadlock.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _deadlock-reference-label:
2+
13
# Double locking, deadlocking, GIL
24

35
[TOC]

docs/advanced/misc.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,8 @@ back into Python.
6363

6464
When writing C++ code that is called from other C++ code, if that code accesses
6565
Python state, it must explicitly acquire and release the GIL. A separate
66-
document on deadlocks [#f8]_ elaborates on a particularly subtle interaction
67-
with C++'s block-scope static variable initializer guard mutexes.
68-
69-
.. [#f8] deadlock.md
66+
document on :ref:`deadlock-reference-label` elaborates on a particularly subtle
67+
interaction with C++'s block-scope static variable initializer guard mutexes.
7068

7169
The classes :class:`gil_scoped_release` and :class:`gil_scoped_acquire` can be
7270
used to acquire and release the global interpreter lock in the body of a C++
@@ -147,7 +145,7 @@ following checklist.
147145
of exceptions.
148146

149147
- C++ static block-scope variable initialization that calls back into Python can
150-
cause deadlocks; see [#f8]_ for a detailed discussion.
148+
cause deadlocks; see :ref:`deadlock-reference-label` for a detailed discussion.
151149

152150
- You should try running your code in a debug build. That will enable additional assertions
153151
within pybind11 that will throw exceptions on certain GIL handling errors

0 commit comments

Comments
 (0)