Pass data to a subprocess
Laszlo Nagy
gandalf at shopzeus.com
Wed Aug 1 04:19:19 EDT 2012
>
> As I wrote "I found many nice things (Pipe, Manager and so on), but
> actually even
> this seems to work:" yes I did read the documentation.
Sorry, I did not want be offensive.
>
> I was just surprised that it worked better than I expected even
> without Pipes and Queues, but now I understand why..
>
> Anyway now I would like to be able to detach subprocesses to avoid the
> nasty code reloading that I was talking about in another thread, but
> things get more tricky, because I can't use queues and pipes to
> communicate with a running process that it's noit my child, correct?
>
Yes, I think that is correct. Instead of detaching a child process, you
can create independent processes and use other frameworks for IPC. For
example, Pyro. It is not as effective as multiprocessing.Queue, but in
return, you will have the option to run your service across multiple
servers.
The most effective IPC is usually through shared memory. But there is no
OS independent standard Python module that can communicate over shared
memory. Except multiprocessing of course, but AFAIK it can only be used
to communicate between fork()-ed processes.
More information about the Python-list
mailing list