Merge pull request #26 from dave-shawley/signal-safe

Runner: remove logging from signal handler.
This commit is contained in:
Andrew Rabert 2018-08-21 10:51:43 -04:00 committed by GitHub
commit 3a434d43c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View file

@ -3,6 +3,14 @@
Release History
===============
`Next Release`_
---------------
- Remove logging from the signal handler. Logger's cannot safely be used
from within signal handlers. See `Thread Safety`_ in the logging module
documentation for details.
.. _Thread Safety: https://docs.python.org/3/library/logging.html#thread-safety
`1.5.0`_ (29 Jan 2018)
----------------------
- Enable port reuse for Tornado versions newer than 4.3.

View file

@ -139,7 +139,6 @@ class Runner(object):
iol.start()
def _on_signal(self, signo, frame):
self.logger.info('signal %s received, stopping', signo)
ioloop.IOLoop.instance().add_callback_from_signal(self._shutdown)
def _shutdown(self):