summaryrefslogtreecommitdiff
path: root/Types/Concurrency.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2020-04-20 13:53:27 -0400
committerJoey Hess <joeyh@joeyh.name>2020-04-20 15:19:31 -0400
commitcee6b344b401765fc5e32fe9a9e8610d01571bbb (patch)
tree81c64e4b780e96e56f6d92f6d18d7198a9e1aa69 /Types/Concurrency.hs
parent87b7b0f202d475d6fb8aa5598e282897477aac65 (diff)
cat-file resource pool
Avoid running a large number of git cat-file child processes when run with a large -J value. This implementation takes care to avoid adding any overhead to git-annex when run without -J. When run with -J, there is a small bit of added overhead, to manipulate the resource pool. That optimisation added a fair bit of complexity.
Diffstat (limited to 'Types/Concurrency.hs')
-rw-r--r--Types/Concurrency.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/Types/Concurrency.hs b/Types/Concurrency.hs
index 3eab7b71e6..abae4a7729 100644
--- a/Types/Concurrency.hs
+++ b/Types/Concurrency.hs
@@ -11,6 +11,7 @@ import Utility.PartialPrelude
-- the former specifies 1 job of each particular kind, but there can be
-- more than one kind of job running concurrently.
data Concurrency = NonConcurrent | Concurrent Int | ConcurrentPerCpu
+ deriving (Eq)
parseConcurrency :: String -> Maybe Concurrency
parseConcurrency "cpus" = Just ConcurrentPerCpu