[Stackless] multiprocess channels

stackless.nst at internike.com stackless.nst at internike.com
Wed Mar 28 12:09:25 CEST 2012

Thank you Richard,

I did a couple of trials with (mp) Queues, and with a (mp) manager.

In both cases, the channel is indeed available to the child processes, 
but they just cant communicate.
I added two examples of this in the page 

Sounds logical to me, as the channel needs a little extra logic to 
differentiate between pids ("who just received something on a pending 
receive() ? me, or another process ?"), which is not a problem for threads.

I'll improve, comment & let you know, after checking if there is really 
nothing that can be done to make it faster.
Right now,  on my machine, I have around 2ms across pids, compared to 
around 2µs for a real stackless channel on a single pid.
Slow, but hey, getting around the GIL ;-)



On 03/27/2012 11:19 PM, Richard Tew wrote:
> I took a skim through this morning before I left the house, and I 
> think it generally looked fine.
> Channels already work across threads, is there a reason they don't 
> work as is in a suitable manner?  If not, perhaps we ought to consider 
> making them do so in Stackless itself?
> I'll take a closer look at the code later on when I have a more usable 
> device than an iPad at my hands. Just as well gmail saves drafts as 
> safari just crashed again..
> Once you're happy with it, if you want to commit a version to the 
> Stackless examples project let me know.
> Cheers,
> Richard.
> On Wednesday, March 28, 2012, <stackless.nst at internike.com 
> <mailto:stackless.nst at internike.com>> wrote:
> > Hey there,
> >
> > I have started playing with the multiprocessing package together 
> with stackless.
> > I came up with this POC implementation of the channels, working 
> across processes.
> >
> > If any of you stackless gurus could take a quick look there:
> >
> > http://www.internike.com/mp_stackless.html
> >
> > and let me know if you see any serious flaw with the basic concept, 
> before I get too excited about it,
> > I'd be infinitely grateful ;-)
> >
> >
> > Nike
> >
> > _______________________________________________
> > Stackless mailing list
> > Stackless at stackless.com <mailto:Stackless at stackless.com>
> > http://www.stackless.com/mailman/listinfo/stackless
> >
> _______________________________________________
> Stackless mailing list
> Stackless at stackless.com
> http://www.stackless.com/mailman/listinfo/stackless
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20120328/c2d5b02d/attachment.html>

More information about the Stackless mailing list