suggestion on a complicated inter-process communication

Aaron Brady castironpi at gmail.com
Tue Apr 28 07:34:36 CEST 2009


On Apr 27, 10:59 pm, Way <csw... at gmail.com> wrote:
> Hello friends,
>
> I have a little messy situation on IPC. Please if you can, give me
> some suggestion on how to implement. Thanks a lot!
>
> -> denotes create
>
> MainProcess -> Process1 -> Process3 (from os.system)
>                    |
>                     -> Process2 (from os.system) -> Process4 (from
> os.system) ->Process5
>
> I would like to make the communication between Process1 and Process5.
> Process1 needs Process5's output to provide argument to generate
> Process3, and in turn Process5 needs to wait Process3 finished.
>
> Thank you very much if you can give a hint.

The 'mmap' module can help with getting the data from 5 to 1.  It
requires creating a file.  If it's a small amount of data, any old
file will do.  You may need a socket in order to wait for Process3 to
join, or write a small '.pyd' or '.so' file that gives you access to
your system's synchronization object.



More information about the Python-list mailing list