File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -36,11 +36,12 @@ def wait_for_ready(self, timeout=None):
36
36
37
37
from ..manager import KernelManager
38
38
if not isinstance (self .parent , KernelManager ):
39
- # We aren't connected to a manager,
40
- # so first wait for kernel to become responsive to heartbeats
39
+ # This Client was not created by a KernelManager,
40
+ # so wait for kernel to become responsive to heartbeats
41
+ # before checking for kernel_info reply
41
42
while not self .is_alive ():
42
43
if time .time () > abs_timeout :
43
- raise RuntimeError ("Kernel didn't respond to heartbeats in %d seconds" % timeout )
44
+ raise RuntimeError ("Kernel didn't respond to heartbeats in %d seconds and timed out " % timeout )
44
45
time .sleep (0.2 )
45
46
46
47
# Wait for kernel info reply on shell channel
Original file line number Diff line number Diff line change @@ -183,7 +183,8 @@ def is_alive(self):
183
183
"""Is the kernel process still running?"""
184
184
from .manager import KernelManager
185
185
if isinstance (self .parent , KernelManager ):
186
- # We were created by a KernelManager, we can ask them:
186
+ # This KernelClient was created by a KernelManager,
187
+ # we can ask the parent KernelManager:
187
188
return self .parent .is_alive ()
188
189
if self ._hb_channel is not None :
189
190
# We don't have access to the KernelManager,
Original file line number Diff line number Diff line change @@ -64,5 +64,7 @@ def init_io(self):
64
64
pass # disable stdout/stderr capture
65
65
66
66
if __name__ == '__main__' :
67
+ # make startup artificially slow,
68
+ # so that we exercise client logic for slow-starting kernels
67
69
time .sleep (2 )
68
70
SignalTestApp .launch_instance ()
You can’t perform that action at this time.
0 commit comments