What to use Multiprocessing or multi
This question already has an answer here:
It heavily depends on the type of analysis. Here is a simple rule of thumb to give hints:
If you cannot be sure a priori, just experiment... But never forget that no method is absolutely better that the others in all possible use cases
Maybe this is what you're looking for. https://nathangrigg.com/2015/04/python-threading-vs-processes
possible answer
Do you also need a brief description of these two & differences?
To be short, if one of your sub-problems has to wait another finishes, Multi Thread is good (for example, I/O heavy operations); by contrast, if your sub-problems could really happen at the same time, Multi Processing is suggested. However, you won't create more processes than your number of cores. maybe this will explain you better
链接地址: http://www.djcxy.com/p/55196.html上一篇: 试验线程和多处理模块,python
下一篇: 什么使用多处理或多