check-ignore resource pool
Much like check-attr before.
This commit is contained in:
parent
45fb7af21c
commit
04352ed9c5
7 changed files with 66 additions and 27 deletions
|
@ -16,7 +16,7 @@ import qualified Git.CheckAttr as Git
|
|||
import qualified Annex
|
||||
import Utility.ResourcePool
|
||||
import Types.Concurrency
|
||||
import GHC.Conc
|
||||
import Annex.Concurrent.Utility
|
||||
|
||||
{- All gitattributes used by git-annex. -}
|
||||
annexAttrs :: [Git.Attr]
|
||||
|
@ -54,13 +54,7 @@ mkConcurrentCheckAttrHandle c =
|
|||
- while respecting the -Jn value.
|
||||
-}
|
||||
maxCheckAttrs :: Concurrency -> IO Int
|
||||
maxCheckAttrs c = do
|
||||
let cn = case c of
|
||||
Concurrent n -> n
|
||||
NonConcurrent -> 1
|
||||
ConcurrentPerCpu -> 1
|
||||
pn <- liftIO getNumProcessors
|
||||
return (min cn pn)
|
||||
maxCheckAttrs = concurrencyUpToCpus
|
||||
|
||||
checkAttrStop :: Annex ()
|
||||
checkAttrStop = maybe noop stop =<< Annex.getState Annex.checkattrhandle
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue