4 ms·
> but multi-threaded Python code is not, by far. Eh, isn't that because of the GIL?
by netheril96 11y ago
> but multi-threaded Python code is not, by far.
Eh, isn't that because of the GIL?
- js8 11y agoYou may be right. But it's 2 levels of comments and I am still waiting for some examples of use case. Any use case I can think of can be better served with Java or C++ or C. In fact, as I understand it, you can actually call multi-threaded applications from Python. You can only execute Python code (in the same interpreter) single-threaded. Although, an embedded scripting language (say, in a game) could in theory benefit. But isn't Python already too big for that kind of applications?
- netheril96 11y agoA common use case is GUI, where you offload heavy computation into a separate thread to avoid blocking the main thread. I once saw a GitHub project of a Python GUI abandoned where the README said he/she gave it up because the lack of threading results in unresponsive GUI all the time.