[IPython-dev] Kernel race condition on Mac OS
paulgb at gmail.com
Sun Sep 15 12:29:45 EDT 2013
I'm developing with the kernel APIs and I've encountered a race condition.
It seems to be a Mac-specific thing; I haven't been able to reproduce it on
Ubuntu or CentOS.
The following code demonstrates the problem. It's also available as a
The call to iopub.get_msg will (usually) fail unless sleep(1) is
from IPython.kernel import KernelManager
from time import sleep
km = KernelManager()
kc = km.client()
iopub = kc.iopub_channel
shell = kc.shell_channel
shell.execute('print "hello world"')
if __name__ == '__main__':
By experimenting with where the sleep(1) call can go, it seems that
the kernel subprocess takes a few milliseconds to be ready to accept
Is there any call to check if the kernel is ready?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev