def _flush_results(self, sock):
        idents,msg = self.session.recv(sock, mode=zmq.NOBLOCK)
        while msg is not None:
            if self.debug:
                pprint(msg)
            msg_type = msg['msg_type']
            handler = self._queue_handlers.get(msg_type, None)
            if handler is None:
                raise Exception("Unhandled message type: %s"%msg.msg_type)
            else:
                handler(msg)
            idents,msg = self.session.recv(sock, mode=zmq.NOBLOCK)
Flush task or queue results waiting in ZMQ queue.
dataset/ETHPy150Open ipython/ipython-py3k/IPython/parallel/client/client.py/Client._flush_results