provide a Show instance that works for all WorkerPools
This commit is contained in:
parent
6e59c652d2
commit
20d9a9b662
1 changed files with 8 additions and 1 deletions
|
@ -20,7 +20,14 @@ data WorkerPool t = WorkerPool
|
|||
-- but there can temporarily be fewer values, when a thread is
|
||||
-- changing between stages.
|
||||
}
|
||||
deriving (Show)
|
||||
|
||||
instance Show (WorkerPool t) where
|
||||
show p = unwords
|
||||
[ "WorkerPool"
|
||||
, show (usedStages p)
|
||||
, show (workerList p)
|
||||
, show (length (spareVals p))
|
||||
]
|
||||
|
||||
-- | A worker can either be idle or running an Async action.
|
||||
-- And it is used for some stage.
|
||||
|
|
Loading…
Reference in a new issue