[Stackless] Moving channel ends on pickled tasklets

Andrew Francis andrewfr_ice at yahoo.com
Tue Jul 8 16:09:08 CEST 2008

Message: 1
Date: Mon, 7 Jul 2008 21:19:22 -0400
From: "Gabriel Lavoie" <glavoie at gmail.com>
Subject: [Stackless] Moving channel ends on pickled tasklets
To: stackless at stackless.com
    <d05df8620807071819m3f431e79vd472e44f7b6e4e90 at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

>I want to move a tasklet A to another machine. This tasklet receives data >on a channel then process it. Is it possible for the tasklet B that >pickles this tasklet A to take posession of the channel to act as a proxy >to redirect data to the new location of A?

I believe to move the tasklet to another machine, it would probably be best to first detach the tasklet from the channel with a __reduce__ and __setState__

see this page for details: http://www.stackless.com/wiki/Pickling

As a precaution, I would also make sure that no other objects had a reference to the tasklet after it was serialised.

When you deserialise the tasklet, reattach it to a channel, using __reduce__ and __setState__.



More information about the Stackless mailing list