Commit 6b5c5a9
authored
Handle EINTR retry in os.write() (PEP 475) (#7482)
* Handle EINTR retry in os.write() (PEP 475)
Add EINTR retry loop to os.write(), matching the existing
pattern in os.read() and os.readinto(). Remove the
expectedFailure marker from test_write in _test_eintr.py.
* Add atomic snapshot for dict/dict_keys in extract_elements
Add fast paths for dict and dict_keys types in
extract_elements_with, matching _list_extend() in CPython
Objects/listobject.c. Each branch takes an atomic snapshot
under a single read lock, preventing race conditions from
concurrent dict mutation without the GIL.
Remove expectedFailure from test_thread_safety.1 parent 211649d commit 6b5c5a9
File tree
4 files changed
+23
-13
lines changed- Lib/test
- crates/vm/src
- stdlib
- vm
4 files changed
+23
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
167 | 166 | | |
168 | 167 | | |
169 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4814 | 4814 | | |
4815 | 4815 | | |
4816 | 4816 | | |
4817 | | - | |
4818 | | - | |
4819 | 4817 | | |
4820 | 4818 | | |
4821 | 4819 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
330 | 337 | | |
331 | 338 | | |
332 | 339 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
1822 | 1822 | | |
1823 | 1823 | | |
1824 | 1824 | | |
1825 | | - | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
1826 | 1828 | | |
1827 | 1829 | | |
1828 | 1830 | | |
1829 | 1831 | | |
1830 | 1832 | | |
1831 | 1833 | | |
1832 | 1834 | | |
| 1835 | + | |
| 1836 | + | |
| 1837 | + | |
| 1838 | + | |
| 1839 | + | |
| 1840 | + | |
1833 | 1841 | | |
1834 | | - | |
1835 | 1842 | | |
1836 | 1843 | | |
1837 | 1844 | | |
1838 | 1845 | | |
1839 | 1846 | | |
1840 | 1847 | | |
1841 | 1848 | | |
1842 | | - | |
1843 | 1849 | | |
1844 | 1850 | | |
1845 | 1851 | | |
| |||
0 commit comments