<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 5.50.4522.1800" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#fffff0>
<DIV><STRONG><FONT size=4></FONT></STRONG> </DIV>
<DIV><STRONG><FONT size=4></FONT></STRONG> </DIV>
<DIV><STRONG><FONT size=4>can anybody help me with this problem? i am using
stackless python 2.0 on win98se, on a laptop. when i execute the following
program:</FONT></STRONG></DIV>
<DIV><STRONG><FONT size=4></FONT></STRONG> </DIV>
<DIV><STRONG><FONT size=4> import uthread9 as
uthread<BR> import time</FONT></STRONG></DIV>
<DIV><STRONG><FONT size=4></FONT></STRONG> </DIV>
<DIV><STRONG><FONT size=4> def timer_elapsed( started
):<BR> return time.time() -
started</FONT></STRONG></DIV>
<DIV><STRONG><FONT size=4></FONT></STRONG> </DIV>
<DIV><STRONG><FONT size=4> def timer_over( started, stoptime
):<BR> return timer_elapsed( started )
> stoptime</FONT></STRONG></DIV>
<DIV><STRONG><FONT size=4></FONT></STRONG> </DIV>
<DIV><STRONG><FONT size=4> def timer( letter, stoptime
):<BR> started =
time.time()<BR> print "%s is started"
% letter<BR> while not timer_over(
started, stoptime
):<BR>
pass<BR> print '%s is done after
%3.2fs' % ( letter, timer_elapsed( started ) )</FONT></STRONG></DIV>
<DIV><STRONG><FONT size=4></FONT></STRONG> </DIV>
<DIV><STRONG><FONT size=4> uthread.new( timer, 'a', 5 )
<BR> uthread.new( timer, 'b', 3 ) <BR>
uthread.new( timer, 'c', 2 ) </FONT></STRONG></DIV>
<DIV><STRONG><FONT size=4></FONT></STRONG> </DIV>
<DIV><STRONG><FONT size=4> uthread.run()
<BR></FONT></STRONG></DIV>
<DIV><STRONG><FONT size=4>my output looks like this:</FONT></STRONG></DIV>
<DIV><STRONG><FONT size=4></FONT></STRONG> </DIV>
<DIV><STRONG><FONT size=4> a is started<BR>
a is done after 5.05s<BR> b is started<BR> b
is done after 3.02s<BR> c is started<BR> c
is done after 2.04s</FONT></STRONG></DIV>
<DIV><STRONG><FONT size=4></FONT></STRONG> </DIV>
<DIV><STRONG><FONT size=4>which clearly indicates that the threads do *not* run
in the parallel. moreover, the outputs from all the examples on <A
href="http://world.std.com/~wware/uthread.html">http://world.std.com/~wware/uthread.html</A> also
point into interpreting them as being executed one thread after the other. since
all the snippets as well as the test suite u1.py from that page work without
complaining, i guess that there is no problem with my installation.
</FONT></STRONG></DIV>
<DIV><STRONG><FONT size=4></FONT></STRONG> </DIV>
<DIV><STRONG><FONT size=4>furthermore, i tried a few examples using the
threading module, and the results appear to be ok. because of this and because
uthreads are not, to my understanding and unlike the threading module, dependent
on the os, it can't be my laptop that's to small to fit in threads :-|
...</FONT></STRONG></DIV>
<DIV><STRONG><FONT size=4></FONT></STRONG> </DIV>
<DIV><STRONG><FONT size=4>can anyone help me parallelize my
uthreads?</FONT></STRONG></DIV>
<DIV><STRONG><FONT size=4></FONT></STRONG> </DIV>
<DIV><STRONG><FONT size=4></FONT></STRONG> </DIV>
<DIV><STRONG><FONT size=4>yours, </FONT></STRONG></DIV>
<DIV><STRONG><FONT size=4></FONT></STRONG> </DIV>
<DIV><STRONG><FONT size=4>-wolf</FONT></STRONG></DIV>
<DIV><STRONG><FONT size=4></FONT></STRONG> </DIV>
<DIV><STRONG><FONT size=4></FONT></STRONG> </DIV>
<DIV><STRONG><FONT size=4></FONT></STRONG> </DIV>
<DIV><STRONG><FONT size=4> </FONT></STRONG></DIV>
<DIV><STRONG><FONT size=4> </DIV></FONT></STRONG></BODY></HTML>