3 ms·
Great advice, in general. One small point to remember is that it is impossible to implement a completely non-blocking output using the C++ ostream classes. Th
by pjkundert 11y ago
Great advice, in general. One small point to remember is that it is impossible to implement a completely non-blocking output using the C++ ostream classes.
The underlying streambuf doesn't provide intrinsics to measure the remaining capacity of the output buffer, and may be forced to flush at any output request -- causing unavoidable blocking.
Of course, it is possible to implement your own streambuf class which provides an interface to measure remaining output buffering capacity. Just something to know...
C++ remains my favourite language; after a couple decades of intensive development using it, pretty much every other language always leaves me feeling "crippled", somehow.
- jcoffland 11y agoYou are right and I think this is a major flaw with the standard library.