0

As the title suggests I am trying to figure out if and why Python threads enable concurrency but not parallelism and I need someone to let me know if I understand things correctly.

If 4 threads are spawned in Python, then it's up to the operating system's scheduler to determine which thread runs on which core of the CPU. However due to the GIL only one thread can execute Python bytecode at a time so parallelism can never be achieved using Python's most common implementation CPython as long as it includes the GIL.

That's my guess from what I've read so far and I am not that familiar with concurrency and parallelism which if I understand correctly are not the same thing.

0 Answers0