Boost C++ Libraries: Ticket #1657: Bug in boost::threads sample https://svn.boost.org/trac10/ticket/1657 <p> Good day. </p> <p> Boost::threads has example "conditions.cpp" in boost\libs\thread\example folder. </p> <p> This sample has problems with synchronyzation between output streams: </p> <pre class="wiki">void sender() { ... std::cout &lt;&lt; "sent: " &lt;&lt; n &lt;&lt; std::endl; // &lt;-- There isn't synchronyzation ... } void receiver() { ... std::cout &lt;&lt; "received: " &lt;&lt; n &lt;&lt; std::endl; // &lt;-- There isn't synchronyzation ... } </pre><p> So the result of this sample looks like this: </p> <pre class="wiki">received: 96 received: sent: 97 // &lt;-- sent: 98 sent: 99 97 // &lt;-- received: 98 </pre><p> I think this is very strange for multithreads synchronization sample ;). </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1657 Trac 1.4.3 Anthony Williams Mon, 14 Apr 2008 21:04:43 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/1657#comment:1 https://svn.boost.org/trac10/ticket/1657#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket