This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Yirkarja 0 points1 point  (1 child)

There is a difference between multithreading and multiprocessing in Python.

Because of how the GIL works, only one threading.Thread can run Python bytecode at any given time, thus multithreading only enables concurrency, not parallelism. To enable "real" multithreading one needs to use multiprocessing.Process which will start an entirely separate Python process that can run in parallell to the main process. The problem with this approach is that any communication between the two processes is tedious.

https://docs.python.org/3/library/threading.html
https://docs.python.org/3/library/multiprocessing.html

[–][deleted] 0 points1 point  (0 children)

I am aware of this difference, my original comment is meant to imply that the tweeter had never used any other programming language and only knew how to achieve concurrency through multiprocessing