3 ms·
Author here, u/skeeto from https://www.reddit.com/r/programming/comments/sxy5q4/pythons_data_races_despite_the_global_interpreter/hxvaou0/?utm_source=reddit&utm
by verdagon 5y ago
Author here, u/skeeto from https://www.reddit.com/r/programming/comments/sxy5q4/pythons_data_races_despite_the_global_interpreter/hxvaou0/?utm_source=reddit&utm_medium=web2x&context=3 https://www.reddit.com/r/programming/comments/sxy5q4/pythons... has some good insight into the 3.10 difference:
> Ironically, CPython 3.10 has gone the opposite direction and made thread scheduling much more deterministic. It now only releases the GIL on backwards edges in the byte code The example in the article always prints 40000000 in CPython 3.10! I expect this will ultimately make Python code less reliable in the future as many programs will accidentally depend on this behavior.
- andreareina 5y agoDoes this mean loops/function call/return?
- rwbhn 5y agoYes. A comment in the referenced commit says "when returning from a call or on the back edges of loops."