from time import time as _time, sleep as _sleep
from traceback import format_exc as _format_exc
from collections import deque
+# sys.exc_clear is used to work around the fact that except blocks
+# don't fully clear the exception until 3.0.
+ module='threading', message='sys.exc_clear')
# Debug support (adapted from ihooks.py).
# All the major classes here derive from _Verbose. We force that to
# be a new-style class so that all the major classes here are new-style.