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, |
|
|
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) |
|
|
39 | #io.rprint('[[Sub]]', msg) # dbg | |
|
39 | 40 | self._in_queue.put(msg) |
|
40 | 41 | |
|
41 | 42 | def msg_ready(self): |
@@ -59,16 +60,17 b' class BlockingSubSocketChannel(SubSocketChannel):' | |||
|
59 | 60 | break |
|
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, |
|
|
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) |
|
|
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?""" |
@@ -90,19 +92,24 b' class BlockingXReqSocketChannel(XReqSocketChannel):' | |||
|
90 | 92 | except Empty: |
|
91 | 93 | break |
|
92 | 94 | return msgs |
|
95 | ||
|
93 | 96 | |
|
94 | 97 | class BlockingRepSocketChannel(RepSocketChannel): |
|
98 | ||
|
95 | 99 | def call_handlers(self, msg): |
|
96 |
io.rprint('[[Rep]]', msg) |
|
|
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 | |
|
105 | ||
|
110 | #io.rprint('[[Heart]]', since_last_heartbeat) # dbg | |
|
111 | pass | |
|
112 | ||
|
106 | 113 | |
|
107 | 114 | class BlockingKernelManager(KernelManager): |
|
108 | 115 |
General Comments 0
You need to be logged in to leave comments.
Login now