summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2018-06-23 20:16:00 -0400
committerAndrew Gallant <jamslam@gmail.com>2018-06-23 20:49:05 -0400
commitd5139228e5787b9ec0ea8209e64d3b878ab72309 (patch)
tree02232843615bd3514e1dce8fda67f9b735cb7fc4 /src
parentbb16ba6311c13369e85b7246380acc9960b52833 (diff)
termcolor: add BufferedStandardStream
This commit adds a new type, BufferedStandardStream, which emulates the StandardStream API (sans `lock`), but will internally use a buffered writer. To achieve this, we add a new default method to the WriteColor trait that indicates whether the underlying writer must synchronously communicate with an API to control coloring (e.g., the Windows console API). The new BufferedStandardStream then uses this default method to determine how eager it should be to flush its buffer before employing color settings. This should have basically zero overhead when using ANSI color escape sequences.
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions