I'm curious if it is possible to append a return value from function f(x,y) into, for example, list.
So I have this:
Parallel:
def download_unit_LVs(self, cislo_uzemia):
pool = Pool(number_of_workers)
for cislo in cisla:
pool.apply_async(self.download_cislo, args=(cislo_uzemia,cislo))
pool.close()
pool.join()
self.manager.commit()
This is the way how I run the method self.download_cislo
parallel but the problem is, that it returns a value which I have to append to results list.
How to do that?
Sequential:
def download_unit_LVs(self, cislo_uzemia):
results = []
for cislo in cisla:
results.append(self.download_cislo(cislo_uzemia,cislo))
self.manager.commit()