Re:The Changing "Guarantees" Given by Python's Global Interp...
by nerdponx on Friday November 17, 2023 @10:16AM
(#38304705)
All the more reason to wonder. What's going to be special-cased to become atomic and thread-safe, and what won't be?
A surprising amount of the CPython stdlib is just pure Python code.
Because the iterator can be pretty much arbitrary Python code it seems to be a bad idea to guarantee extend() to be atomic, as you don't want to hold the list mutex while calling out into user code.