I know that there is no concept of threads in current C++
, but this article is saying:
A typesafe, threadsafe, portable logging mechanism
.....
The
fprintf()
function is threadsafe, so even if this log is used from different threads, the output lines won't be scrambled.
What about cout
, cerr
and clog
?
I think this question is applicable to all kind of stream types in C++ also, like fstream
and stringstream
.