def next_message(self):
        if self._is_running:
            raise Exception('Event loop already running')
        if self._pending_messages:
            return self._pending_messages.popleft()
        self._async_session.run(self._enqueue_request_and_stop,
                                self._enqueue_notification_and_stop)
        if self._pending_messages:
            return self._pending_messages.popleft()
Block until a message(request or notification) is available.
dataset/ETHPy150Open neovim/python-client/neovim/msgpack_rpc/session.py/Session.next_message