add regions to concurrent output

still no progress displays when getting files etc, but a big improvement
This commit is contained in:
Joey Hess 2015-11-04 14:52:07 -04:00
parent 4fd03ccd7b
commit a4dd8503b8
Failed to extract signature
6 changed files with 101 additions and 55 deletions

View file

@ -1,33 +0,0 @@
{- git-annex concurrent output
-
- Copyright 2015 Joey Hess <id@joeyh.name>
-
- Licensed under the GNU GPL version 3 or higher.
-}
{-# LANGUAGE CPP #-}
module Messages.Concurrent where
import Common.Annex
import Messages.Internal
import Types.Messages
#ifdef WITH_CONCURRENTOUTPUT
import qualified System.Console.Concurrent as Console
#endif
{- Enable concurrent output when that has been requested.
-
- This should only be run once per git-annex lifetime, with
- everything that might generate messages run inside it.
-}
withConcurrentOutput :: Annex a -> Annex a
#ifdef WITH_CONCURRENTOUTPUT
withConcurrentOutput a = withOutputType go
where
go (ConcurrentOutput _) = Console.withConcurrentOutput a
go _ = a
#else
withConcurrentOutput = id
#endif