mirror of
https://github.com/IHaskell/IHaskell.git
synced 2025-04-16 19:36:06 +00:00
send IOPub idle message with KernelInfoReply
This commit is contained in:
parent
3fa882a45d
commit
1d9f7c357b
@ -163,7 +163,12 @@ replyTo :: MonadIO m
|
||||
-> Message
|
||||
-> MessageHeader
|
||||
-> m Message
|
||||
replyTo config _ _ KernelInfoRequest{} replyHeader =
|
||||
replyTo config _ interface KernelInfoRequest{} replyHeader = do
|
||||
let send = writeChan (iopubChannel interface)
|
||||
|
||||
idleHeader <- dupHeader replyHeader StatusMessage
|
||||
liftIO . send $ PublishStatus idleHeader Idle
|
||||
|
||||
return
|
||||
KernelInfoReply
|
||||
{ header = replyHeader
|
||||
|
@ -255,7 +255,13 @@ replyTo :: ZeroMQInterface -> Message -> MessageHeader -> KernelState -> Interpr
|
||||
-- Reply to kernel info requests with a kernel info reply. No computation needs to be done, as a
|
||||
-- kernel info reply is a static object (all info is hard coded into the representation of that
|
||||
-- message type).
|
||||
replyTo _ KernelInfoRequest{} replyHeader state =
|
||||
replyTo interface KernelInfoRequest{} replyHeader state = do
|
||||
let send msg = liftIO $ writeChan (iopubChannel interface) msg
|
||||
|
||||
-- Notify the frontend that the Kernel is idle
|
||||
idleHeader <- liftIO $ dupHeader replyHeader StatusMessage
|
||||
send $ PublishStatus idleHeader Idle
|
||||
|
||||
return
|
||||
(state, KernelInfoReply
|
||||
{ header = replyHeader
|
||||
|
Loading…
x
Reference in New Issue
Block a user