Make the gevent workers handle the quit signal by deferring to a new greenlet. Fixes #1126.

This commit is contained in:
Jason Madden 2015-10-15 18:05:59 -05:00
parent 9158ab20f8
commit fb96a9ae69
2 changed files with 6 additions and 0 deletions

1
THANKS
View File

@ -159,3 +159,4 @@ Marc Abramowitz <msabramo@gmail.com>
Hebert J <hebert@mail.ru>
Kevin Littlejohn <kevin@littlejohn.id.au>
Wolfgang Schnerring <wosc@wosc.de>
Jason Madden <jason@nextthought.com>

View File

@ -166,6 +166,11 @@ class GeventWorker(AsyncWorker):
except SystemExit:
pass
def handle_quit(self, sig, frame):
# Move this out of the signal handler so we can use
# blocking calls. See #1126
gevent.spawn(super(GeventWorker, self).handle_quit, sig, frame)
if gevent.version_info[0] == 0:
def init_process(self):