[kevin at nardi.com: Re: [Stackless] Pickling limitations?]

Jørgen Hermanrud Fjeld jhf at hex.no
Thu Oct 2 12:27:31 CEST 2003


Forwarding this answer, as it seems to the point.

----- Forwarded message from Kevin Nardi <kevin at nardi.com> -----

I've been following this discussion, and I believe I might be able to
answer your question.

The problem with your scenario is that Python code may be called from C.
Therefore, a tasklet can contain C-stack information (the C functions to
return to once the Python code is finished executing) and call
schedule().  Then, another tasklet can pickle the aforementioned
tasklet, which contains a C-stack.  So, anytime Python code is called
from C and then calls schedule(), or anytime C code calls
PyStackless_Schedule() you may have an unpickleable tasklet.

I think that's all correct!

Feel free to forward this to the list if it helps.

-Kevin


----- End forwarded message -----

If only my code calls schedule, then it is always safe to pickle, since any
calls to C code must have returned.
Assuming, of course, that schedule isn't called by some of the Stackless
code. 

MVH
Jørgen
_______________________________________________
Stackless mailing list
Stackless at www.tismer.com
http://www.tismer.com/mailman/listinfo/stackless




More information about the Stackless mailing list