[EMAIL PROTECTED] wrote:
The following script does not behave as expected. I wanted to terminate the 'mythread' thread after 5 seconds.

What I see is the threading.Thread call blocking until the 15 second sleep is done. Suggestions?
[snip]
foo = FooClass()
mythread = threading.Thread(foo.stall())

I think you meant to write:

mythread = threading.Thread(target=foo.stall)

In the original version, you're _calling_ foo.stall at the time of thread 
creation.

-Dave
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to