Method summary
- __init__(self, **kwds)
- abort(self)
- cancel(self, timeout = None)
- perform_work(self, callable, *args, **kwds)
- run(self)
Methods
- __init__(self, **kwds)
Passes the thread constructor a name for the thread.
Naming threads makes debugging less impossible. The thread is set to be a daemon thread, which means that if is the only remaining executing thread the program will terminate.
- abort(self)
should the algorithm stop computing?
- cancel(self, timeout = None)
Signals to the worker thread that it should stop computing.
Calling this method before the thread is started generates an exception.
- perform_work(self, callable, *args, **kwds)
Indicates to the thread the method or function and it's arguments.
When the thread begins to run it will execute 'callable' and pass it 'args' and 'kwds'
- run(self)
Private method - used only by the threading.Thread module.
Users signal a thread should start to run by calling start().