Ok, scratch that, I did it anyway!
 
 
import threading
import time
 

class TestRunner:     
    def __init__ (self):
 
        class TestThread ( threading.Thread ):
            def run ( self ):
                self.EXIT = False
                while self.EXIT == False:
                    print '\nRun forever thread\n'
                    time.sleep(2)
 
            def kill(self):
                self.EXIT = True
               
        self.t = TestThread()
        self.t.start()
 
    def kill(self):
        print 'exiting'
        self.t.kill()
 

tr = TestRunner()
time.sleep(5)
tr.kill()


From: jython-users-bounces@lists.sourceforge.net [mailto:jython-users-bounces@lists.sourceforge.net] On Behalf Of DOUTCH GARETH-GDO003
Sent: 30 October 2007 10:25
To: jython-users@lists.sourceforge.net
Subject: [Jython-users] How to kill a running thread?

Is it possible to kill a thread that is running? If so, can anyone point me to an example?
 
Regards,
Gareth