Package Products :: Package ZenUtils :: Module Utils :: Class InterruptableThread
[hide private]
[frames] | no frames]

Class InterruptableThread

source code

        object --+        
                 |        
threading._Verbose --+    
                     |    
      threading.Thread --+
                         |
                        InterruptableThread

A thread class that supports being interrupted. Target functions should catch ThreadInterrupt to perform cleanup.

Code is a somewhat modified version of Bluebird75's solution found at http://stackoverflow.com/questions/323972/is-there-any-way-to-kill-a-thread-in-python

Instance Methods [hide private]
 
_raise(self, exception_type=ThreadInterrupt) source code
 
interrupt(self, exception_type=ThreadInterrupt) source code
 
kill(self) source code

Inherited from threading.Thread: __init__, __repr__, daemon, getName, ident, isAlive, isDaemon, is_alive, join, name, run, setDaemon, setName, start

Inherited from threading.Thread (private): _block, _reset_internal_locks, _set_daemon, _set_ident

Inherited from threading._Verbose (private): _note