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 :)

  • + 1
  • 0
  • 253
  • 2
  • 3

Answers

Comments

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