class ExceptionHandlingThread(threading.Thread): (source)
Thread handler making it easier for parent to handle thread exceptions. Based in part on Fabric 1's ThreadHandler. See also Fabric GH issue #204. When used directly, can be used in place of a regular ``threading.Thread``. If subclassed, the subclass must do one of: - supply ``target`` to ``__init__`` - define ``_run()`` instead of ``run()`` This is because this thread's entire point is to wrap behavior around the thread's execution; subclasses could not redefine ``run()`` without breaking that functionality. .. versionadded:: 1.0
Method | __init__ |
Create a new exception-handling thread instance. |
Method | __repr__ |
Undocumented |
Method | exception |
If an exception occurred, return an `.ExceptionWrapper` around it. |
Method | run |
Undocumented |
Instance Variable | daemon |
Undocumented |
Instance Variable | exc |
Undocumented |
Instance Variable | kwargs |
Undocumented |
Property | is |
Returns ``True`` if not alive and has a stored exception. |
Create a new exception-handling thread instance. Takes all regular `threading.Thread` keyword arguments, via ``**kwargs`` for easier display of thread identity when raising captured exceptions.