python notifying calling script that multiprocessing tasks have finished at lower level scripts

Thomas Jollans tjol at
Fri Apr 13 12:36:55 EDT 2018

On 13/04/18 18:08, Daiyue Weng wrote:
> (the structure
> is attached as a png file).

No it's not. This is a text-only list.

(you know what, I'm sick of saying that)

> The execution is sequential, e.g. running script_1, then 2 then 3.
> After executing the 1st sequence (script_1 to 3), master will execute the
> 2nd sequence (script_4 to 6).
> Each child script will be calling a multiprocessing function to process a
> task.

I could ask what motivates this convoluted-sounding structure...

> [snip]
> I like to know how to notify the master when the 2nd sequence is finished
> that all multiprocess tasks (seq 1 and 2) are completed, and then maybe
> close the multiprocessing.

Well, I suppose you'll have to keep all the Process objects around
somewhere where they can be checked on.

You might want to use a multiprocessing.Pool.

More information about the Python-list mailing list