diff options
author | 2016-09-09 15:49:44 -0400 | |
---|---|---|
committer | 2016-09-09 15:51:34 -0400 | |
commit | d1f722e3b0b74a9d9a2e35ac1f47dbca9f7cf606 (patch) | |
tree | 74314a3747d4a0456135bf38b2e1115b5a3f64b9 /Messages/Progress.hs | |
parent | 2408f5c6084aa04a09b36edcd264ce6bc7177c93 (diff) |
better locking for json with -J
Avoid threads emitting json at the same time and scrambling, which was
still possible even with the buffering, just less likely.
Converted json IO actions to JSONChunk data too.
Diffstat (limited to 'Messages/Progress.hs')
-rw-r--r-- | Messages/Progress.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Messages/Progress.hs b/Messages/Progress.hs index a48e7b07e..39709a211 100644 --- a/Messages/Progress.hs +++ b/Messages/Progress.hs @@ -11,7 +11,6 @@ module Messages.Progress where import Common import Messages -import Messages.Internal import Utility.Metered import Types import Types.Messages @@ -59,7 +58,7 @@ metered othermeter key a = case keySize key of #endif go _ (MessageState { outputType = JSONOutput False }) = nometer go size (MessageState { outputType = JSONOutput True }) = do - buf <- withMessageState $ return . showJSONBuffer + buf <- withMessageState $ return . jsonBuffer m <- liftIO $ rateLimitMeterUpdate 0.1 (Just size) $ JSON.progress buf size a (combinemeter m) @@ -93,7 +92,7 @@ concurrentMeteredFile file combinemeterupdate key a = {- Progress dots. -} showProgressDots :: Annex () -showProgressDots = outputMessage q "." +showProgressDots = outputMessage JSON.none "." {- Runs a command, that may output progress to either stdout or - stderr, as well as other messages. |