Daily bit(e) of C++ | std::osyncstream
Daily bit(e) of C++ #382, The C++20 synchronized thread-safe wrapper for std::ostream: std::osyncstream.
C++20 introduced synchronized streams.
Multiple synchronized streams can be used to write to a single destination stream without introducing data races or interleaving as long as all accesses to that stream are through a synchronized stream.