multithreading concept

Paul Rubin http
Fri Feb 9 11:14:10 EST 2007


"S.Mohideen" <moin at blackhole.labs.rootshell.ws> writes:
> Suppose I split my Net application code using parallel python into
> several processes based upon the number of CPU available. That means a
> single socket descriptor is distributed across all processes. Is
> parallelity can be acheived using the processes send/recv on the
> single socket multiplexed across all the processes.. I haven't tried
> it yet - would like to have any past experience related to this.

In Linux, you can open the socket before forking and then use it in
the child processes; there is also a way to pass open sockets from one
process to another, but the Python lib currently does not support that
feature.  It's worth adding and there's an open RFE for it, but it
hasn't been important enough that anyone's bothered coding it so far.



More information about the Python-list mailing list