Written by

Question Jiri Svoboda · Mar 8, 2018

Parallel execution in COS

Hello community,

I need to perform some processing-heavy operations on a set of input objects and I would like to utilize more than a single processor core to do the heavy lifting.

Is there any way to call methods in parallel and wait for the results in a blocking way?

Basically, I am looking for an equivalent of the pythonese

with Pool(n) as p:
    results = p.map(function, data)

Thanks

Jiri

EDIT: Correct English :)

Comments

Jiri Svoboda · Mar 9, 2018

Thanks for all the responses, it turned out Robert Cemper's solution fit my needs perfectly.

0