Standard IPC for Python?

sturlamolden sturlamolden at yahoo.no
Wed Jan 14 13:15:26 CET 2009


On Jan 14, 12:47 pm, Laszlo Nagy <gand... at shopzeus.com> wrote:

> multiprocessing.Queue cannot be used as a general message queue
> between arbitrary processes.

Then e.g. use Listener and Client in multiprocessing.connection to
create a named pipe (AF_PIPE). Or use win32pipe.CreateNamedPipe from
pywin32.


> - mmap.mmap with 0 or -1 as the first argument (Windows and Linux,
> > respectively)
>
> Which lacks synchronization between processes.

It gives you access to shared memory. You must obviously use
synchronization objects for synchronization.



> (How do you notify the
> other process? How can the other process wait until notified?)

multiprocessing.Event
multiprocessing.Lock
win32event.CreateEvent
win32event.SetEvent
win32event.CreateMutex

etc.


















More information about the Python-list mailing list