![]() |
Please explain me Pathos Pool() - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Homework (https://python-forum.io/forum-9.html) +--- Thread: Please explain me Pathos Pool() (/thread-11191.html) |
Please explain me Pathos Pool() - Antigr - Jun-27-2018 Is this scheme right? Or it forks only with for i in range? from pathos.multiprocessing import ProcessingPool as Pool p=Pool() def calculating (arg1,arg2): **some calculating** return result result=p.map(calculating,arg1,arg2) print resultThanks! RE: Please explain me Pathos Pool() - Larz60+ - Jun-27-2018 pool is just the name assigned to the imported package (pathos.multiprocessing, ProcessingPool class) pool() - creates an instance of the ProcessingPool class see docs: http://pathos.readthedocs.io/en/latest/ |