News for hackers. Stuff that matters.
Re:Python Threading Beginners Tutorial [video] by wdroz on Thursday August 17, 2017 @07:46AM (#15035821)
The problem is the GIL : https://wiki.python.org/moin/GlobalInterpreterLock

Multiprocessing allows you to use all cores, but you can't share memory like in threads. So you have to Serialize/Deserialize a lot for exchange data.

If your serializations cost are low and need computation power, you should use multiprocessing. If you are just waiting I/O you can use threads.

BTW, modern python "ProcessPoolExecutor" is not designed for compute heavy batch like "Pool" from "multiprocessing".

There are no comments on this comment yet.