[IronPython] thread pickling

Bob Ippolito bob at redivi.com
Sun Mar 5 02:24:09 CET 2006


He means what he said -- he wants to pickle the generator.  That  
involves saving the whole stack, the bytecode offset, and potentially  
the bytecode itself.  In stackless, it's not restricted to just  
generators, so it's a bit more useful.

In the stackless implementation, you can pickle a running tasklet,  
send it to another machine, and unpickle it and it will continue  
where it left off (with some restrictions, of course).  You can also  
use that kind of facility to emulate a functional call/cc I guess,  
but that's probably a bad idea.

-bob

On Mar 4, 2006, at 3:42 PM, J. Merrill wrote:

> Do you mean "pickle the values returned by invoking the generator  
> until it stops" (e.g. with a for loop) and "unpickle those to a  
> Python list"?  Or do you mean something else that's more difficult?
>
> It's certainly easy enough to do those two things, isn't it?
>
> At 08:17 PM 3/3/2006, Arman Bostani wrote (in part)
>> Basically, if you can properly pickle/unpickle a generator, the  
>> problem is solved.
>
>
> J. Merrill / Analytical Software Corp
>
> _______________________________________________
> users mailing list
> users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com




More information about the Ironpython-users mailing list