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.
This commit is contained in:
Joey Hess 2016-09-09 15:49:44 -04:00
parent 05d4438383
commit a108235565
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
6 changed files with 63 additions and 42 deletions

View file

@ -105,7 +105,6 @@ showRemoteUrls :: M.Map UUID Remote -> (UUID, [URLString]) -> Annex ()
showRemoteUrls remotemap (uu, us)
| null us = noop
| otherwise = case M.lookup uu remotemap of
Just r -> do
let ls = unlines $ map (\u -> name r ++ ": " ++ u) us
outputMessage noop ('\n' : indent ls ++ "\n")
Just r -> showLongNote $
unlines $ map (\u -> name r ++ ": " ++ u) us
Nothing -> noop