mirror of
https://github.com/IHaskell/IHaskell.git
synced 2025-04-16 19:36:06 +00:00
Move busy message as well
This commit is contained in:
parent
cea94e8eb0
commit
13925c7157
16
main/Main.hs
16
main/Main.hs
@ -171,6 +171,12 @@ runKernel kOpts profileSrc = do
|
||||
-- Create a header for the reply.
|
||||
replyHeader <- createReplyHeader (header request)
|
||||
|
||||
-- Notify the frontend that the kernel is busy computing. All the headers are copies of the reply
|
||||
-- header with a different message type, because this preserves the session ID, parent header, and
|
||||
-- other important information.
|
||||
busyHeader <- liftIO $ dupHeader replyHeader StatusMessage
|
||||
liftIO $ writeChan (iopubChannel interface) $ PublishStatus busyHeader Busy
|
||||
|
||||
-- We handle comm messages and normal ones separately. The normal ones are a standard
|
||||
-- request/response style, while comms can be anything, and don't necessarily require a response.
|
||||
if isCommMessage request
|
||||
@ -270,12 +276,6 @@ replyTo interface req@ExecuteRequest { getCode = code } replyHeader state = do
|
||||
dir <- liftIO getIHaskellDir
|
||||
liftIO $ Stdin.recordParentHeader dir $ header req
|
||||
|
||||
-- Notify the frontend that the kernel is busy computing. All the headers are copies of the reply
|
||||
-- header with a different message type, because this preserves the session ID, parent header, and
|
||||
-- other important information.
|
||||
busyHeader <- liftIO $ dupHeader replyHeader StatusMessage
|
||||
send $ PublishStatus busyHeader Busy
|
||||
|
||||
-- Construct a function for publishing output as this is going. This function accepts a boolean
|
||||
-- indicating whether this is the final output and the thing to display. Store the final outputs in
|
||||
-- a list so that when we receive an updated non-final output, we can clear the entire output and
|
||||
@ -418,10 +418,6 @@ handleComm send kernelState req replyHeader = do
|
||||
let run = capturedIO publish kernelState
|
||||
publish = publishResult send replyHeader displayed updateNeeded pOut toUsePager
|
||||
|
||||
-- Notify the frontend that the kernel is busy
|
||||
busyHeader <- liftIO $ dupHeader replyHeader StatusMessage
|
||||
liftIO . send $ PublishStatus busyHeader Busy
|
||||
|
||||
newState <- case Map.lookup uuid widgets of
|
||||
Nothing -> return kernelState
|
||||
Just (Widget widget) ->
|
||||
|
Loading…
x
Reference in New Issue
Block a user