I am trying to learn multithreading and I have a simple question. In most of the examples that I find, the standard output buffer is disabled before allowing multiple threads to use it with:
setbuf (standard output, NULL);
Why? Codes print the same if I delete this line on them!
It is possible that they will not print the same thing - when the output is buffered, it may not be displayed immediately, which may change the order in which the lines are displayed between the streams.
, , .
, , , . I.e., stdout , , stdout.
stdout
, .
Source: https://habr.com/ru/post/1775761/More articles:Get MAC Address - mac-addressвызов IDirect3D9:: CreateDevice() из DllMain зависает - directxLazyTableImages for iPhone Sample Code Refresh Question - iphoneFinite Difference Optimization with SSE - optimizationWinCE - unable to start debugging - visual-studio-2008How to reduce the size of JBOSS? - javaJSONP data transfer - jsonpPHP arrays and memory allocation - arraysC запустить внешнюю программу и получить результат - cMonotouch Threading - Best Design - multithreadingAll Articles