3 ms·
It simply isn't true that "the GIL allows only one thread to run at a time." "Note that potentially blocking or long-running operations, such as I/O, image pro
by slurgfest 14y ago
It simply isn't true that "the GIL allows only one thread to run at a time."
"Note that potentially blocking or long-running operations, such as I/O, image processing, and NumPy number crunching, happen outside the GIL. Therefore it is only in multithreaded programs that spend a lot of time inside the GIL, interpreting CPython bytecode, that the GIL becomes a bottleneck."
The sky isn't falling, in the worst possible case you can still use Jython or whatever
- dmbaggett 14y agoRight, that's why I qualified my statement with ...unless the GIL is subverted via C extensions or similar. The sky isn't falling, in the worst possible case you can still use Jython or whatever. Sigh. I could port to C++ or whatever, too.
- Flimm 14y ago"unless the GIL is subverted via C extensions or similar." I would hardly call I/O with Python built-in functions to be a subversion of the GIL.
- slurgfest 14y agoThe entire interpreter is written in C. Using facilities written in C, as documented, is not "subverting" anything. That's ridiculous hyperbole and it really doesn't help your credibility.