[Stackless] Problem Unpickling Class
Andrew Francis
andrewfr_ice at yahoo.com
Thu Jul 27 16:30:32 CEST 2006
Hello Richard and Colleagues:
On 7/27/06, Andrew Francis <andrewfr_ice at yahoo.com>
wrote:
>I don't think it is possible to tell what is going
>wrong from the code you have provided. Since the
>problem is where the data is unpickled, we would kind
>of need to see where you call loads() as well.
>I imagine this is a straightforward pickling problem,
>and doubt it is related to Stackless. Do you think
>this is caused because of some Stackless related
>pickling that is going on?
It would be great if this is a straightforward
pickling problem on my side.
At this stage, I do not have enough knowledge to know
if it is a problem with Stackless, cPickle, or the way
I do things.
Here is my unpickling code.
def testThree(self):
f = open("server.dat")
print "[restoring server]"
server = pickle.load(f)
print "[restored]"
f = open("channels.dat")
print "[restoring our channels]"
channels = pickle.load(f)
f.close()
print "[restored]"
f = open("synchronizer.dat")
print "[restoring our synchronizer]"
synchronizer = pickle.load(f)
print "[restored]"
f.close()
f = open("tasklets.dat")
print "[restoring our tasklets]"
tasklets = pickle.load(f)
print "[restored]"
"""
restore the channels
"""
requestChannel = channels[0]
responseChannel = channels[1]
"""
tell the SchedulerDaemon to resume processing
the tasklets in the daemon that are blocked.
"""
synchronizer.proceed()
while stackless.getruncount() > 1:
stackless.schedule()
Richard, in general, I am trying to learn how to
structure code as to allow easy pickling and
unpickling of a programme.
Eventually the SchedulingDaemon itself will scheduler
tasklets it creates.
Thank you,
Andrew
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless
More information about the Stackless
mailing list