Commit b54a99d
authored
Fix the signal handler: it now always uses the main interpreter,
rather than trying to get the current Python thread state.
The following function now accepts an interpreter, instead of a
Python thread state:
* _PyEval_SignalReceived()
* _Py_ThreadCanHandleSignals()
* _PyEval_AddPendingCall()
* COMPUTE_EVAL_BREAKER()
* SET_GIL_DROP_REQUEST(), RESET_GIL_DROP_REQUEST()
* SIGNAL_PENDING_CALLS(), UNSIGNAL_PENDING_CALLS()
* SIGNAL_PENDING_SIGNALS(), UNSIGNAL_PENDING_SIGNALS()
* SIGNAL_ASYNC_EXC(), UNSIGNAL_ASYNC_EXC()
Py_AddPendingCall() now uses the main interpreter if it fails to the
current Python thread state.
Convert _PyThreadState_GET() and PyInterpreterState_GET_UNSAFE()
macros to static inline functions.
1 parent cfc3c2f commit b54a99d
File tree
6 files changed
+94
-85
lines changed- Include/internal
- Misc/NEWS.d/next/Core and Builtins
- Modules
- Python
6 files changed
+94
-85
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
313 | | - | |
| 313 | + | |
314 | 314 | | |
315 | | - | |
| 315 | + | |
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | | - | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
344 | 346 | | |
345 | 347 | | |
346 | 348 | | |
| |||
354 | 356 | | |
355 | 357 | | |
356 | 358 | | |
357 | | - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
358 | 363 | | |
359 | 364 | | |
360 | 365 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
| 255 | + | |
| 256 | + | |
260 | 257 | | |
261 | 258 | | |
262 | | - | |
| 259 | + | |
263 | 260 | | |
264 | 261 | | |
265 | 262 | | |
| |||
299 | 296 | | |
300 | 297 | | |
301 | 298 | | |
302 | | - | |
| 299 | + | |
303 | 300 | | |
304 | 301 | | |
305 | 302 | | |
| |||
318 | 315 | | |
319 | 316 | | |
320 | 317 | | |
321 | | - | |
| 318 | + | |
322 | 319 | | |
323 | 320 | | |
324 | 321 | | |
| |||
476 | 473 | | |
477 | 474 | | |
478 | 475 | | |
479 | | - | |
| 476 | + | |
480 | 477 | | |
481 | 478 | | |
482 | 479 | | |
| |||
704 | 701 | | |
705 | 702 | | |
706 | 703 | | |
707 | | - | |
| 704 | + | |
708 | 705 | | |
709 | 706 | | |
710 | 707 | | |
| |||
1681 | 1678 | | |
1682 | 1679 | | |
1683 | 1680 | | |
1684 | | - | |
| 1681 | + | |
1685 | 1682 | | |
1686 | 1683 | | |
1687 | 1684 | | |
| |||
1787 | 1784 | | |
1788 | 1785 | | |
1789 | 1786 | | |
1790 | | - | |
1791 | | - | |
| 1787 | + | |
| 1788 | + | |
1792 | 1789 | | |
1793 | 1790 | | |
1794 | 1791 | | |
| |||
1824 | 1821 | | |
1825 | 1822 | | |
1826 | 1823 | | |
1827 | | - | |
1828 | | - | |
| 1824 | + | |
| 1825 | + | |
1829 | 1826 | | |
1830 | 1827 | | |
1831 | 1828 | | |
| |||
0 commit comments