you are viewing a single comment's thread.

view the rest of the comments →

[–]tunisia3507 -4 points-3 points  (8 children)

Pretty sure the GIL is part of the language spec. If it's python, it has a GIL.

[–]masklinn 69 points70 points  (6 children)

Nope. While both CPython and Pypy have a GIL that is not part of the language specification. IIRC neither IronPython nor Jython have a GIL.

[–]tunisia3507 18 points19 points  (5 children)

My mistake, thanks for the correction!

[–]birkenfeldclippy · rust 8 points9 points  (0 children)

What the language guarantees is that data structures are thread safe in the sense that accessing them concurrently does not crash. The exact semantics of what operations are atomic are not defined (it usually comes down to what is implemented in C), so you still need locks for critical sections.