class documentation

class ExceptionHandlingThread(threading.Thread): (source)

View In Hierarchy

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_info Undocumented
Instance Variable kwargs Undocumented
Property is_dead Returns ``True`` if not alive and has a stored exception.
def __init__(self, **kwargs): (source)

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.

def __repr__(self): (source)

Undocumented

def exception(self): (source)

If an exception occurred, return an `.ExceptionWrapper` around it. :returns: An `.ExceptionWrapper` managing the result of `sys.exc_info`, if an exception was raised during thread execution. If no exception occurred, returns ``None`` instead. .. versionadded:: 1.0

def run(self): (source)

Undocumented

Undocumented

exc_info = (source)

Undocumented

Undocumented

Returns ``True`` if not alive and has a stored exception. Used to detect threads that have excepted & shut down. .. versionadded:: 1.0