### External dependencies.
import thread as T
-from sys import exc_info
+from sys import exc_info, excepthook
###--------------------------------------------------------------------------
### What's going on?
try:
_debug(' _start(%s): call user (args = %s, kwargs = %s)' %
(me, args, kwargs))
- me._func(*args, **kwargs)
+ me._onexit = [me._func(*args, **kwargs), None]
except:
- _switchto(findvictim(me.parent), None, exc_info())
+ exc = exc_info()
+ _debug(' _start(%s): caught exception (%s)' % (me, exc))
+ me._onexit = [None, exc]
finally:
_debug(' _start(%s): finally' % me)
_debug(' _start(%s): _onexit = %s' % (me, me._onexit))