[Stackless] preempting pickled tasklets
John Tantalo
john.tantalo at gmail.com
Thu Nov 16 22:25:43 CET 2006
Hi, I'm having another problem related to resuming pickled tasklets. On some
systems, when I try to preemptively schedule a resumed tasklet, the tasklet
runs away and is not interrupted. Currently this is is only occuring on
SPARC (see version, etc. below).
Python 2.4.3 Stackless 3.1b3 060516 (#1, Nov 2 2006, 15:36:59)
[GCC 2.95.3 20010315 (release)] on sunos5
To illustrate what I'm talking about, I have run the included script on the
offending system. The output never stops, while it quickly stops after about
12 iterations on my Ubuntu machine (running the same version of Stackless
and Python). Why can the tasklet be preempted on the first call to run, but
not on the second? I really need this to work, so I'm prepared to dig deeper
if anyone can point me in the right direction.
Sincerely,
John Tantalo
import stackless
from stackless import tasklet
import pickle
def f():
i = 1
while 1:
print 'hello', i
i += 1
t = tasklet(f)()
stackless.run(100)
print 'de/serialize'
s = pickle.dumps(t)
t = pickle.loads(s)
t.insert()
stackless.run(100)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20061116/ac1e6c75/attachment.htm>
-------------- next part --------------
_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless
More information about the Stackless
mailing list