Skip to content

Commit

Permalink
network-mux: stylistic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
coot committed Oct 10, 2024
1 parent a25ff6c commit 5d40f57
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions network-mux/src/Network/Mux.hs
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,8 @@ type MiniProtocolKey = (MiniProtocolNum, MiniProtocolDir)
newtype MonitorCtx m mode = MonitorCtx {
-- | Mini-Protocols started on demand and waiting to be scheduled.
--
mcOnDemandProtocols :: (Map MiniProtocolKey
(MiniProtocolState mode m, MiniProtocolAction m))
mcOnDemandProtocols :: Map MiniProtocolKey
(MiniProtocolState mode m, MiniProtocolAction m)

}

Expand Down Expand Up @@ -369,10 +369,10 @@ monitor tracer timeout jobpool egressQueue cmdQueue muxStatus =
go !monitorCtx@MonitorCtx { mcOnDemandProtocols } = do
result <- atomically $ runFirstToFinish $
-- wait for a mini-protocol thread to terminate
(FirstToFinish $ EventJobResult <$> JobPool.waitForJob jobpool)
FirstToFinish (EventJobResult <$> JobPool.waitForJob jobpool)

-- wait for a new control command
<> (FirstToFinish $ EventControlCmd <$> readTQueue cmdQueue)
<> FirstToFinish (EventControlCmd <$> readTQueue cmdQueue)

-- or wait for data to arrive on the channels that do not yet have
-- responder threads running
Expand Down

0 comments on commit 5d40f57

Please sign in to comment.