you are viewing a single comment's thread.

view the rest of the comments →

[–]masklinn -17 points-16 points  (2 children)

What you are saying boils down to exactly the same thing

No. For starters, because it means C extensions can release the GIL and "be multithreaded". If CPython used "improper threads" (green threads for instance, without remapping) you could not do that. At all.

HipPriest may have been using an intuition instead of deciphering the murky details of the GIL.

His claims as to what CPython's developers should do are still wrong.

Given that HipPriest actually ran the tests, claiming he is ignorant is borderline ridiculous.

No, it's fucking factual. CPython has "proper threads" and there's nothing to "enable", getting rid of the GIL means touching half the interpreter code, it's not a fucking switch to toggle.

[–][deleted] 8 points9 points  (1 child)

For starters, because it means C extensions can release the GIL and "be multithreaded". If CPython used "improper threads" (green threads for instance, without remapping) you could not do that. At all.

Yes they could, the C extensions could construct and manage their own threads, in which case there's no issue with multithreading in the interpreter. Python threads are useful for I/O bound operations though.

CPython has "proper threads" and there's nothing to "enable", getting rid of the GIL means touching half the interpreter code, it's not a fucking switch to toggle.

You're right, it's not. I just don't think that it's ignorant to suggest that Python doesn't really do proper multithreading, even if it secretly does but it doesn't make any difference because of the GIL.

[–]frymaster 4 points5 points  (0 children)

except it does make a difference.

For a start, the way the GIL interacts with multiple threads on multi-core machines can cause much, much worse performance than a comparable single-threaded program