Catch KeyboardInterrupt so we don't barf a trace
Concerns issue #1531. Future work can actually try to save state in this case, but especially with multiprocessing, that might become a bit hairy.
This commit is contained in:
@@ -659,3 +659,6 @@ See http://docs.overviewer.org/en/latest/index.html#help
|
|||||||
|
|
||||||
This is the error that occurred:""")
|
This is the error that occurred:""")
|
||||||
util.nice_exit(1)
|
util.nice_exit(1)
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
logging.info("Interrupted by user. Aborting.")
|
||||||
|
util.nice_exit(2)
|
||||||
|
|||||||
@@ -261,6 +261,8 @@ class MultiprocessingDispatcherProcess(multiprocessing.Process):
|
|||||||
self.result_queue.put(result, False)
|
self.result_queue.put(result, False)
|
||||||
except queue.Empty:
|
except queue.Empty:
|
||||||
pass
|
pass
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
return
|
||||||
|
|
||||||
class MultiprocessingDispatcher(Dispatcher):
|
class MultiprocessingDispatcher(Dispatcher):
|
||||||
"""A subclass of Dispatcher that spawns worker processes and
|
"""A subclass of Dispatcher that spawns worker processes and
|
||||||
|
|||||||
Reference in New Issue
Block a user