Killing a thread

pauljolly at my-deja.com pauljolly at my-deja.com
Thu Aug 3 10:33:08 EDT 2000


Dear All,

I have a slight problem and I cannot seem to find the answer. I have
decided that using threads would be a good idea for my program written
in Python. I want to start a thread that retrieves a URL. Now, after a
certain time, say 30 seconds or one minute, I want to test whether that
thread is still running. If the thread is still running I want to kill
that thread. I am using threading module, and currently Thread() class
to create a new class object. I then start the thread using start()...
but I do not know where to go from here for the testing and the killing
part described above. Could someone please help?

I will in the end start about seven threads simultaneously and check to
see whether any of them are running after a specified time. If there
are threads running, kill them.

Best regards,


Paul


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list