projects
/
git-annex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e59c65
)
provide a Show instance that works for all WorkerPools
author
Joey Hess
<joeyh@joeyh.name>
Thu, 14 Nov 2019 15:00:59 +0000
(11:00 -0400)
committer
Joey Hess
<joeyh@joeyh.name>
Thu, 14 Nov 2019 15:00:59 +0000
(11:00 -0400)
Types/WorkerPool.hs
patch
|
blob
|
history
diff --git
a/Types/WorkerPool.hs
b/Types/WorkerPool.hs
index 23ef345574a3768d00a880d14a60887d85e1dcd5..178c30166c574bf5b87d780b6d918029a1938a8d 100644
(file)
--- a/
Types/WorkerPool.hs
+++ b/
Types/WorkerPool.hs
@@
-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.