threading module timer object
dhostetler at sopris.net
Tue Feb 4 00:09:02 CET 2003
I have a multithreading app, and I want to watch each thread with a
currently, I using the the threading modules timer object, and
try:/except: statements, to raise a user defined exception. The user
defined exception is raised after the said timespan passes, but
processing that occurs after catching the exception never happens.
I think i'm fairly close to getting this working, but can't figure out
what i'm doing wrong here. any input?
def __init__(self, queue, threadNo=None):
self.__queue = queue
self.__TimeOut = "Thread timed out"
t = threading.Timer(5.0, self.flagIt)
#do something here
More information about the Python-list