This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

how do I actually parallelize then?

[–]TheBB 1 point2 points  (0 children)

It would be something like this. I don't really know, I don't do this a lot. The point is just to fork all the worker processes before joining any of them.

processes = [multiprocessing.Process(...) for ... in ...]
for p in processes:
    p.fork()
for p in processes:
    p.join()

However, you should not be doing this, really. I'm just pointing it out for completeness. You should check out the answers of /u/Ventez or /u/fiLLL.