Repository navigation
gh-149101: Implement PEP 788 #149116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-149101: Implement PEP 788 #149116
Changes from 1 commit
43b0798
722dbdf
73cccbb
25e1cf0
af1022a
2fb8419
1096a32
407062f
a33bdfc
c504a9f
f95bfc7
a00bfbb
6ca2499
74259f8
eff9b40
bc78c10
0a30c25
fe3d8a1
ad69f96
1623556
cad8786
e042656
6a05c90
728ee3a
d9e1170
2f824d3
ab9d783
10e241e
25687af
6d3b40a
0c08141
31f1155
6c62b40
d8ce02d
e105120
eb73203
09a0d69
5a3f808
d43ba9d
9a04e93
a382721
03862fb
df720a5
767c894
38a2153
321c783
811ca19
ac58a16
4ced3a1
9345afd
11cbe5c
99098d7
1c184f1
af57d9d
7289037
a538acc
4bec1e7
5d28e1a
62b137e
2378c88
e7466f1
5d797cf
5f1d2e0
4b446e7
b4db0a6
c43cae7
5e25ba9
08e845c
17b0e2a
f60d888
dd930ef
7aa2f65
541169d
d75e6d9
9f7b014
f9cb8f7
29fa419
211edf1
aaa516e
e1da86c
95cdd3a
e203fd5
3987445
45d6ece
319b700
a34dbc6
9e48209
59e2d9a
7a6cc0c
0945129
c5148d1
adb985f
53fa94b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -608,8 +608,8 @@ it possible to avoid these issues by temporarily preventing finalization: | |
|
|
||
| .. seealso:: | ||
|
|
||
| :pep:`788` explains the design, motivation and rationale | ||
| for these APIs. | ||
| :pep:`788` explains the design, motivation and rationale | ||
| for these APIs. | ||
|
|
||
| .. c:type:: PyInterpreterGuard | ||
|
|
||
|
|
@@ -625,19 +625,19 @@ it possible to avoid these issues by temporarily preventing finalization: | |
| guards for that interpreter. This means that if you forget to close an | ||
| interpreter guard, the process will **permanently hang** during | ||
| finalization! | ||
| Holding a guard for an interpreter is similar to holding a | ||
| :term:`strong reference` to a Python object, except finalization does not happen | ||
| automatically after all guards are released: it requires an explicit | ||
| :c:func:`Py_EndInterpreter` call. | ||
|
|
||
| Holding a guard for an interpreter is similar to holding a | ||
| :term:`strong reference` to a Python object, except finalization does not happen | ||
| automatically after all guards are released: it requires an explicit | ||
| :c:func:`Py_EndInterpreter` call. | ||
|
|
||
| .. versionadded:: next | ||
|
|
||
|
|
||
| .. c:function:: PyInterpreterGuard *PyInterpreterGuard_FromCurrent(void) | ||
|
|
||
| Create a finalization guard for the current interpreter. This will prevent | ||
| finalization until the guard is closed. | ||
| finalization until the guard is closed. | ||
|
|
||
| For example: | ||
|
|
||
|
|
@@ -770,8 +770,8 @@ deleted. This can be done using interpreter views. | |
| Failure indicates that the process is out of memory or that the main | ||
| interpreter has finalized (or never existed). | ||
|
|
||
| Using this function in extension libraries is strongly discouraged, because | ||
| it typically compromises the library's subinterpreter support. It exists | ||
| Using this function in extension libraries is strongly discouraged, because | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should use an affirmative tone. For example:
|
||
| it typically compromises the library's subinterpreter support. It exists | ||
| for exceptional cases where there is no other option (such as when a native | ||
| threading library doesn't provide a ``void *arg`` parameter that could be | ||
| used to store a ``PyInterpreterGuard`` or ``PyInterpreterView`` pointer). | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.