mirror of
https://github.com/composewell/streamly.git
synced 2024-09-11 19:47:10 +03:00
Rename dumpSVar to dumpChannel
This commit is contained in:
parent
f5e8d91b0e
commit
4a8a9a8571
@ -21,7 +21,7 @@ module Streamly.Internal.Data.Fold.Channel.Type
|
||||
, newChannel
|
||||
, sendToWorker
|
||||
, checkFoldStatus
|
||||
, dumpSVar
|
||||
, dumpChannel
|
||||
)
|
||||
where
|
||||
|
||||
@ -87,9 +87,11 @@ data Channel m a b = Channel
|
||||
, svarCreator :: ThreadId
|
||||
}
|
||||
|
||||
{-# NOINLINE dumpSVar #-}
|
||||
dumpSVar :: Channel m a b -> IO String
|
||||
dumpSVar sv = do
|
||||
-- | Dump the channel stats for diagnostics. Used when 'inspect' option is
|
||||
-- enabled.
|
||||
{-# NOINLINE dumpChannel #-}
|
||||
dumpChannel :: Channel m a b -> IO String
|
||||
dumpChannel sv = do
|
||||
xs <- sequence $ intersperse (return "\n")
|
||||
[ return (dumpCreator (svarCreator sv))
|
||||
, return "---------CURRENT STATE-----------"
|
||||
@ -195,7 +197,7 @@ readOutputQChan chan = do
|
||||
liftIO
|
||||
$ withDiagMVar
|
||||
(svarInspectMode chan)
|
||||
(dumpSVar chan)
|
||||
(dumpChannel chan)
|
||||
"readOutputQChan: nothing to do"
|
||||
$ takeMVar (outputDoorBell chan)
|
||||
readOutputQRaw (outputQueue chan) ss
|
||||
|
@ -144,7 +144,7 @@ parEval modifier f =
|
||||
liftIO
|
||||
$ withDiagMVar
|
||||
(svarInspectMode chan)
|
||||
(dumpSVar chan)
|
||||
(dumpChannel chan)
|
||||
"parEval: waiting to drain"
|
||||
$ takeMVar (outputDoorBellFromConsumer chan)
|
||||
-- XXX remove recursion
|
||||
@ -153,5 +153,5 @@ parEval modifier f =
|
||||
when (svarInspectMode chan) $ liftIO $ do
|
||||
t <- getTime Monotonic
|
||||
writeIORef (svarStopTime (svarStats chan)) (Just t)
|
||||
printSVar (dumpSVar chan) "SVar Done"
|
||||
printSVar (dumpChannel chan) "SVar Done"
|
||||
return b
|
||||
|
Loading…
Reference in New Issue
Block a user