mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
Merge pull request #7748 from minrk/poll-windows
add no-op every 5s on Windows
This commit is contained in:
commit
4bca402eae
@ -1061,6 +1061,11 @@ class NotebookApp(BaseIPythonApplication):
|
||||
threading.Thread(target=b).start()
|
||||
|
||||
self.io_loop = ioloop.IOLoop.current()
|
||||
if sys.platform.startswith('win'):
|
||||
# add no-op to wake every 5s
|
||||
# to handle signals that may be ignored by the inner loop
|
||||
pc = ioloop.PeriodicCallback(lambda : None, 5000)
|
||||
pc.start()
|
||||
try:
|
||||
self.io_loop.start()
|
||||
except KeyboardInterrupt:
|
||||
|
Loading…
Reference in New Issue
Block a user