diff --git a/jupyter-channels.el b/jupyter-channels.el index 9019c7f..7c7c7a8 100644 --- a/jupyter-channels.el +++ b/jupyter-channels.el @@ -85,17 +85,17 @@ A channel is alive if its socket property is bound to a (and (slot-boundp channel 'socket) (not (null (oref channel socket))))) -(cl-defmethod jupyter-channel-push-message ((channel jupyter-channel) msg) +(cl-defmethod jupyter-push-message ((channel jupyter-channel) msg) (let ((ring (oref channel recv-queue))) (ring-insert+extend ring msg 'grow))) -(cl-defmethod jupyter-channel-get-message ((channel jupyter-channel)) +(cl-defmethod jupyter-get-message ((channel jupyter-channel)) (unless (ring-empty-p (oref channel recv-queue)) (cl-destructuring-bind (idents . msg) (ring-remove (oref channel recv-queue)) msg))) -(cl-defmethod jupyter-channel-messages-available-p ((channel jupyter-channel)) +(cl-defmethod jupyter-messages-available-p ((channel jupyter-channel)) (not (ring-empty-p (oref channel recv-queue)))) (defclass jupyter-hb-channel () diff --git a/jupyter-client.el b/jupyter-client.el index 470b7bf..9d19d76 100644 --- a/jupyter-client.el +++ b/jupyter-client.el @@ -303,7 +303,7 @@ using the CHANNEL's socket." '(stdin-channel shell-channel iopub-channel))))) - (jupyter-channel-push-message channel data) + (jupyter-push-message channel data) (run-with-timer 0.001 nil #'jupyter-handle-message client channel)))))) (cl-defmethod jupyter-start-channels ((client jupyter-kernel-client) @@ -496,8 +496,8 @@ are taken: `jupyter-handle-execute-result', `jupyter-handle-kernel-info-reply', ... - Cleanup request when kernel is done processing it" - (when (jupyter-channel-messages-available-p channel) - (let* ((msg (jupyter-channel-get-message channel)) + (when (jupyter-messages-available-p channel) + (let* ((msg (jupyter-get-message channel)) (pmsg-id (jupyter-message-parent-id msg)) (requests (oref client requests)) (req (gethash pmsg-id requests)))