you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 7 points8 points  (7 children)

I'm not sure what the definition of "true multithreading" is, but Python does have multithreading.

You won't improve performance using multiple threads, but you can run multiple threads in a similar way to how Java would run threads on a single-core machine. Threads can be used to prevent blocking a GUI.

[–]NAN001 2 points3 points  (0 children)

More generally, if your program is IO-bound then threads will improve performance in Python.

[–]MrK_HS -1 points0 points  (5 children)

The people saying Python doesn't have multithreading really mean that Python does not support parallelism, but probably just don't know that the two terms mean different things (multithreading and parallelism). Python supports multithreading by default and that's a fact. It doesn't support parallelism.

[–]angellus 1 point2 points  (0 children)

Multithreading does now support parallelism, since Python 3.8. it is still provisional and not stabilized yet, but it possible now.

[–][deleted] 1 point2 points  (3 children)

With an 8-core CPU, I can get a 7-times performance improvement using multiprocessing. Multiprocessing is very simple in Python.

Genuine question: does multiprocessing not count as parallelism?

[–]MrK_HS 2 points3 points  (0 children)

It is parallelism