Commit 375b723
authored
PyDict_Next no longer locks the dictionary in the free-threaded build. Locking
around individual PyDict_Next calls is not sufficient because the function
returns borrowed references and because it allows concurrent modifications
during the iteraiton loop.
The internal locking also interferes with correct external synchronization
because it may suspend outer critical sections created by the caller.
1 parent dee63cb commit 375b723
File tree
4 files changed
+34
-8
lines changed- Doc
- c-api
- howto
- Misc/NEWS.d/next/C API
- Objects
4 files changed
+34
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
293 | 304 | | |
294 | 305 | | |
295 | 306 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
117 | 135 | | |
118 | 136 | | |
119 | 137 | | |
| |||
141 | 159 | | |
142 | 160 | | |
143 | 161 | | |
144 | | - | |
| 162 | + | |
145 | 163 | | |
146 | 164 | | |
147 | 165 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2808 | 2808 | | |
2809 | 2809 | | |
2810 | 2810 | | |
2811 | | - | |
2812 | | - | |
2813 | 2811 | | |
2814 | 2812 | | |
2815 | 2813 | | |
| |||
2882 | 2880 | | |
2883 | 2881 | | |
2884 | 2882 | | |
2885 | | - | |
2886 | | - | |
2887 | | - | |
2888 | | - | |
2889 | | - | |
| 2883 | + | |
2890 | 2884 | | |
2891 | 2885 | | |
2892 | 2886 | | |
| |||
0 commit comments