Commit 8c2b9a4e authored by Sumit Sahrawat's avatar Sumit Sahrawat

Send status updates for comm replies

parent c76feb6f
......@@ -308,7 +308,10 @@ handleComm send kernelState req replyHeader = do
toUsePager = usePager kernelState
run = capturedIO publish kernelState
publish = publishResult send replyHeader displayed updateNeeded pagerOutput toUsePager
case Map.lookup uuid widgets of
busyHeader <- liftIO $ dupHeader replyHeader StatusMessage
liftIO . send $ PublishStatus busyHeader Busy
newState <- case Map.lookup uuid widgets of
Nothing -> return kernelState
Just (Widget widget) ->
case msgType $ header req of
......@@ -322,3 +325,8 @@ handleComm send kernelState req replyHeader = do
pgrOut <- liftIO $ readMVar pagerOutput
liftIO $ publish $ FinalResult disp (if toUsePager then pgrOut else []) []
return kernelState { openComms = Map.delete uuid widgets }
idleHeader <- liftIO $ dupHeader replyHeader StatusMessage
liftIO . send $ PublishStatus idleHeader Idle
return newState
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment