Python Forum
Please explain me Pathos Pool()
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Please explain me Pathos Pool()
#1
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 result
Thanks!
Reply
#2
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/
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Calculate time taken to cool down a pool in python edwinostby 0 1,864 May-24-2021, 04:12 PM
Last Post: edwinostby
  Help! For pool to While pool nikecorei5 4 4,462 Dec-06-2017, 11:04 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020