PYTHON-1050 Rare RuntimeError during shutdown.

This commit is contained in:
A. Jesse Jiryu Davis 2016-01-30 12:51:51 -05:00
parent 9b9ad1747d
commit 9e6b66c499

View File

@ -79,8 +79,8 @@ class PeriodicExecutor(object):
if self._thread is not None:
try:
self._thread.join(timeout)
except ReferenceError:
# Thread already terminated.
except (ReferenceError, RuntimeError):
# Thread already terminated, or not yet started.
pass
def wake(self):