##// END OF EJS Templates
warn and stop polling if WaitForMultipleObjects fails
Min RK -
Show More
@@ -6,6 +6,8 b' import time'
6 from thread import interrupt_main
6 from thread import interrupt_main
7 from threading import Thread
7 from threading import Thread
8
8
9 from IPython.utils.warn import warn
10
9
11
10 class ParentPollerUnix(Thread):
12 class ParentPollerUnix(Thread):
11 """ A Unix-specific daemon thread that terminates the program immediately
13 """ A Unix-specific daemon thread that terminates the program immediately
@@ -121,7 +123,9 b' class ParentPollerWindows(Thread):'
121 elif handle == self.parent_handle:
123 elif handle == self.parent_handle:
122 os._exit(1)
124 os._exit(1)
123 elif result < 0:
125 elif result < 0:
124 # wait failed, but don't let this throttle CPU
126 # wait failed, just give up and stop polling.
125 # if this is going to repeat, perhaps we should
127 warn("""Parent poll failed. If the frontend dies,
126 # just give up and return.
128 the kernel may be left running. Please let us know
127 time.sleep(.1)
129 about your system (bitness, Python, etc.) at
130 ipython-dev@scipy.org""")
131 return
General Comments 0
You need to be logged in to leave comments. Login now