The GIL is controversial because it prevents multithreaded CPython programs from taking full advantage of multiprocessor systems in certain situations. 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.
17
u/oconnor663 Nov 20 '15 edited Nov 20 '15
This depends on whether your code is CPU-bound or IO-bound, right? Don't Python threats release the GIL before they wait on network reads and stuff?
Edit: Found what I was looking for: