##// END OF EJS Templates
Add missing msg queue + comment out debug printing in BlockingKernelManager.
epatters -
Show More
@@ -31,11 +31,12 b' from .kernelmanager import (KernelManager, SubSocketChannel,'
31 31 class BlockingSubSocketChannel(SubSocketChannel):
32 32
33 33 def __init__(self, context, session, address=None):
34 super(BlockingSubSocketChannel, self).__init__(context, session, address)
34 super(BlockingSubSocketChannel, self).__init__(context, session,
35 address)
35 36 self._in_queue = Queue()
36 37
37 38 def call_handlers(self, msg):
38 io.rprint('[[Sub]]', msg) # dbg
39 #io.rprint('[[Sub]]', msg) # dbg
39 40 self._in_queue.put(msg)
40 41
41 42 def msg_ready(self):
@@ -60,15 +61,16 b' class BlockingSubSocketChannel(SubSocketChannel):'
60 61 return msgs
61 62
62 63
63
64 64 class BlockingXReqSocketChannel(XReqSocketChannel):
65 65
66 66 def __init__(self, context, session, address=None):
67 super(BlockingXReqSocketChannel, self).__init__(context, session, address)
67 super(BlockingXReqSocketChannel, self).__init__(context, session,
68 address)
68 69 self._in_queue = Queue()
69 70
70 71 def call_handlers(self, msg):
71 io.rprint('[[XReq]]', msg) # dbg
72 #io.rprint('[[XReq]]', msg) # dbg
73 self._in_queue.put(msg)
72 74
73 75 def msg_ready(self):
74 76 """Is there a message that has been received?"""
@@ -91,17 +93,22 b' class BlockingXReqSocketChannel(XReqSocketChannel):'
91 93 break
92 94 return msgs
93 95
96
94 97 class BlockingRepSocketChannel(RepSocketChannel):
98
95 99 def call_handlers(self, msg):
96 io.rprint('[[Rep]]', msg) # dbg
100 #io.rprint('[[Rep]]', msg) # dbg
101 pass
97 102
98 103
99 104 class BlockingHBSocketChannel(HBSocketChannel):
105
100 106 # This kernel needs rapid monitoring capabilities
101 107 time_to_dead = 0.2
102 108
103 109 def call_handlers(self, since_last_heartbeat):
104 io.rprint('[[Heart]]', since_last_heartbeat) # dbg
110 #io.rprint('[[Heart]]', since_last_heartbeat) # dbg
111 pass
105 112
106 113
107 114 class BlockingKernelManager(KernelManager):
General Comments 0
You need to be logged in to leave comments. Login now