Hi all,

Is there a way that the program that created and started a thread also stops 
it.
(My usage is a time-out).

E.g.

thread = threading.Thread(target=Loop.testLoop)
thread.start()     # This thread is expected to finish within a second
thread.join(2)    # Or time.sleep(2) ?

if thread.isAlive():
    # thread has probably encountered a problem and hangs
    # What should be here to stop thread  ??????

Note that I don't want to change the target (too much), as many possible 
targets exist,
together thousands of lines of code.

Thanks,
Hans 


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

Reply via email to