questions that can really derail a sunday evening:
is std::cout thread-safe?
(not in the way you'd want it to be, no)
questions that can really derail a sunday evening:
is std::cout thread-safe?
(not in the way you'd want it to be, no)
Consider this code. One thread repeatedly prints the number 100 in decimal to std::cout. Another thread repeatedly prints the number 0x100 in hex (which will output as '100') to std::cout.
You might reasonably expect that the output will simply be '100' over and over and over.
Unfortunately, the calls to operator<< can get interleaved so you end up with crosstalk of the format specifiers:
@luna The whole modal formatting thing is gratuitously stupid. It's slower, uglier, and had awful gotchas like this compared to printf.
@dotstdy @luna iostream formatting is the most clown-shoes misfeature in the whole clown-shoes language.
@luna tfw you're not even better than printf on any axis
@luna it's thr safead
GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.
All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.