Prioritize shell messages more than others

This avoids problems with a reply message and a status idle message being
received at identical times for a request. Two messages can be received at the
same time when the fractional seconds resolution of the time stamps received
from the kernel are not high enough. If the iopub channel had a higher priority
it would mean that the idle message would be received before the reply when
they have identical time stamps. Since request objects are removed from the
client when an idle message is received this would prevent any reply callbacks
from running.

To combat this problem, prioritize the shell messages over any other type of
message.
This commit is contained in:
Nathaniel Nicandro 2018-01-04 17:11:21 -06:00
parent 9dd45c6f3e
commit 3509cccbda

View file

@ -443,9 +443,9 @@ using the CHANNEL's socket."
(channels (list (cons stdin :stdin)
(cons shell :shell)
(cons iopub :iopub)))
(priorities (list (cons :iopub 4)
(cons :stdin 4)
(cons :shell 2)))
(priorities (list (cons :shell 4)
(cons :iopub 2)
(cons :stdin 2)))
(idle-count 0)
(queue (make-ring 10)))
(cl-flet ((send-recvd