##// END OF EJS Templates
Adding some temporary hacks to work around (Py)ZMQ bugs on Windows.
epatters -
Show More
@@ -20,6 +20,7 b' Todo'
20 # Standard library imports.
20 # Standard library imports.
21 from Queue import Queue, Empty
21 from Queue import Queue, Empty
22 from subprocess import Popen
22 from subprocess import Popen
23 import sys
23 from threading import Thread
24 from threading import Thread
24 import time
25 import time
25
26
@@ -722,6 +723,11 b' class KernelManager(HasTraits):'
722 """ Attempts to the stop the kernel process cleanly. If the kernel
723 """ Attempts to the stop the kernel process cleanly. If the kernel
723 cannot be stopped, it is killed, if possible.
724 cannot be stopped, it is killed, if possible.
724 """
725 """
726 # FIXME: Shutdown does not work on Windows due to ZMQ errors!
727 if sys.platform == 'win32':
728 self.kill_kernel()
729 return
730
725 self.xreq_channel.shutdown()
731 self.xreq_channel.shutdown()
726 # Don't send any additional kernel kill messages immediately, to give
732 # Don't send any additional kernel kill messages immediately, to give
727 # the kernel a chance to properly execute shutdown actions. Wait for at
733 # the kernel a chance to properly execute shutdown actions. Wait for at
@@ -762,6 +768,11 b' class KernelManager(HasTraits):'
762 self.shutdown_kernel()
768 self.shutdown_kernel()
763 self.start_kernel(**self._launch_args)
769 self.start_kernel(**self._launch_args)
764
770
771 # FIXME: Messages get dropped in Windows due to probable ZMQ bug
772 # unless there is some delay here.
773 if sys.platform == 'win32':
774 time.sleep(0.2)
775
765 @property
776 @property
766 def has_kernel(self):
777 def has_kernel(self):
767 """Returns whether a kernel process has been specified for the kernel
778 """Returns whether a kernel process has been specified for the kernel
General Comments 0
You need to be logged in to leave comments. Login now