Show More
@@ -138,7 +138,7 b' class Kernel(object):' | |||||
138 | task_stream=None, client=None): |
|
138 | task_stream=None, client=None): | |
139 | self.session = session |
|
139 | self.session = session | |
140 | self.control_stream = control_stream |
|
140 | self.control_stream = control_stream | |
141 | self.control_socket = control_stream.socket |
|
141 | # self.control_socket = control_stream.socket | |
142 | self.reply_stream = reply_stream |
|
142 | self.reply_stream = reply_stream | |
143 | self.task_stream = task_stream |
|
143 | self.task_stream = task_stream | |
144 | self.pub_stream = pub_stream |
|
144 | self.pub_stream = pub_stream | |
@@ -235,16 +235,16 b' class Kernel(object):' | |||||
235 | else: |
|
235 | else: | |
236 | handler(self.control_stream, idents, msg) |
|
236 | handler(self.control_stream, idents, msg) | |
237 |
|
237 | |||
238 | def flush_control(self): |
|
238 | # def flush_control(self): | |
239 | while any(zmq.select([self.control_socket],[],[],1e-4)): |
|
239 | # while any(zmq.select([self.control_socket],[],[],1e-4)): | |
240 | try: |
|
240 | # try: | |
241 | msg = self.control_socket.recv_multipart(zmq.NOBLOCK, copy=False) |
|
241 | # msg = self.control_socket.recv_multipart(zmq.NOBLOCK, copy=False) | |
242 | except zmq.ZMQError, e: |
|
242 | # except zmq.ZMQError, e: | |
243 | if e.errno != zmq.EAGAIN: |
|
243 | # if e.errno != zmq.EAGAIN: | |
244 | raise e |
|
244 | # raise e | |
245 | return |
|
245 | # return | |
246 | else: |
|
246 | # else: | |
247 | self.dispatch_control(msg) |
|
247 | # self.dispatch_control(msg) | |
248 |
|
248 | |||
249 |
|
249 | |||
250 | #-------------------- queue helpers ------------------------------ |
|
250 | #-------------------- queue helpers ------------------------------ | |
@@ -404,7 +404,7 b' class Kernel(object):' | |||||
404 | self.abort_queues() |
|
404 | self.abort_queues() | |
405 |
|
405 | |||
406 | def dispatch_queue(self, stream, msg): |
|
406 | def dispatch_queue(self, stream, msg): | |
407 |
self. |
|
407 | self.control_stream.flush() | |
408 | idents,msg = self.session.feed_identities(msg, copy=False) |
|
408 | idents,msg = self.session.feed_identities(msg, copy=False) | |
409 | msg = self.session.unpack_message(msg, content=True, copy=False) |
|
409 | msg = self.session.unpack_message(msg, content=True, copy=False) | |
410 |
|
410 |
General Comments 0
You need to be logged in to leave comments.
Login now