mirror of
https://github.com/IHaskell/IHaskell.git
synced 2025-04-15 19:06:06 +00:00
Fix compliance with Jupyter 5.0 spec for idle messages
This commit is contained in:
parent
d587ce1381
commit
cea94e8eb0
12
main/Main.hs
12
main/Main.hs
@ -191,6 +191,10 @@ runKernel kOpts profileSrc = do
|
||||
-- Write the reply to the reply channel.
|
||||
liftIO $ writeChan (shellReplyChannel interface) reply
|
||||
|
||||
-- Notify the frontend that we're done computing.
|
||||
idleHeader <- liftIO $ dupHeader replyHeader StatusMessage
|
||||
liftIO $ writeChan (iopubChannel interface) $ PublishStatus idleHeader Idle
|
||||
|
||||
where
|
||||
ignoreCtrlC =
|
||||
installHandler keyboardSignal (CatchOnce $ putStrLn "Press Ctrl-C again to quit kernel.")
|
||||
@ -290,10 +294,6 @@ replyTo interface req@ExecuteRequest { getCode = code } replyHeader state = do
|
||||
publish = publishResult send replyHeader displayed updateNeeded pOut (usePager state)
|
||||
updatedState <- evaluate state (T.unpack code) publish widgetMessageHandler
|
||||
|
||||
-- Notify the frontend that we're done computing.
|
||||
idleHeader <- liftIO $ dupHeader replyHeader StatusMessage
|
||||
send $ PublishStatus idleHeader Idle
|
||||
|
||||
-- Take pager output if we're using the pager.
|
||||
pager <- if usePager state
|
||||
then liftIO $ readMVar pOut
|
||||
@ -440,8 +440,4 @@ handleComm send kernelState req replyHeader = do
|
||||
-- Only sensible thing to do.
|
||||
return kernelState
|
||||
|
||||
-- Notify the frontend that the kernel is idle once again
|
||||
idleHeader <- liftIO $ dupHeader replyHeader StatusMessage
|
||||
liftIO . send $ PublishStatus idleHeader Idle
|
||||
|
||||
return newState
|
||||
|
Loading…
x
Reference in New Issue
Block a user