-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix garbled JSON-lines output sometimes
In `kart diff -o json-lines --add-feature-count-estimate={value}`, two threads would write to the output. This correctly used a lock to prevent races, but there is an intermediate bytearray which is written just beforehand (introduced with #1025) and this also needed to use a lock to prevent races. This change moves that intermediate bytearray under the same lock as writing the output buffer, thus avoiding the race condition
- Loading branch information
Showing
2 changed files
with
4 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters