Show More
@@ -402,7 +402,6 b' class Kernel(SessionFactory):' | |||||
402 | #### stream mode: |
|
402 | #### stream mode: | |
403 | if self.control_stream: |
|
403 | if self.control_stream: | |
404 | self.control_stream.on_recv(self.dispatch_control, copy=False) |
|
404 | self.control_stream.on_recv(self.dispatch_control, copy=False) | |
405 | self.control_stream.on_err(printer) |
|
|||
406 |
|
405 | |||
407 | def make_dispatcher(stream): |
|
406 | def make_dispatcher(stream): | |
408 | def dispatcher(msg): |
|
407 | def dispatcher(msg): | |
@@ -411,29 +410,5 b' class Kernel(SessionFactory):' | |||||
411 |
|
410 | |||
412 | for s in self.shell_streams: |
|
411 | for s in self.shell_streams: | |
413 | s.on_recv(make_dispatcher(s), copy=False) |
|
412 | s.on_recv(make_dispatcher(s), copy=False) | |
414 | s.on_err(printer) |
|
413 | ||
415 |
|
||||
416 | if self.iopub_stream: |
|
|||
417 | self.iopub_stream.on_err(printer) |
|
|||
418 |
|
||||
419 | #### while True mode: |
|
|||
420 | # while True: |
|
|||
421 | # idle = True |
|
|||
422 | # try: |
|
|||
423 | # msg = self.shell_stream.socket.recv_multipart( |
|
|||
424 | # zmq.NOBLOCK, copy=False) |
|
|||
425 | # except zmq.ZMQError, e: |
|
|||
426 | # if e.errno != zmq.EAGAIN: |
|
|||
427 | # raise e |
|
|||
428 | # else: |
|
|||
429 | # idle=False |
|
|||
430 | # self.dispatch_queue(self.shell_stream, msg) |
|
|||
431 | # |
|
|||
432 | # if not self.task_stream.empty(): |
|
|||
433 | # idle=False |
|
|||
434 | # msg = self.task_stream.recv_multipart() |
|
|||
435 | # self.dispatch_queue(self.task_stream, msg) |
|
|||
436 | # if idle: |
|
|||
437 | # # don't busywait |
|
|||
438 | # time.sleep(1e-3) |
|
|||
439 |
|
414 |
General Comments 0
You need to be logged in to leave comments.
Login now