Boost C++ Libraries: Ticket #7772: Incorrect condition_variable::notify_one (win32 vc9) https://svn.boost.org/trac10/ticket/7772 <p> When someone calls condition_variable::notify_one never "generations.erase" removes any element. </p> <p> In versión 1.52 this code has been changed thread\win32\condition_variable.hpp:196 struct entry_manager { ... </p> <blockquote> <p> ~entry_manager() { </p> <blockquote> <p> if(! entry-&gt;is_notified()) { </p> <blockquote> <p> entry-&gt;remove_waiter(); </p> </blockquote> <p> } </p> </blockquote> <p> } </p> </blockquote> <p> ... </p> <p> Never call "entry-&gt;remove_waiter()" therefore not remove anything from generations vector. </p> <p> Code example </p> <p> #define BOOST_THREAD_USE_DLL #include &lt;boost/thread.hpp&gt; </p> <p> boost::condition_variable cv; boost::mutex mt; void fTest() { </p> <blockquote> <p> boost::mutex::scoped_lock sl(mt); while(1) { </p> <blockquote> <p> cv.wait(sl); </p> </blockquote> <p> } </p> </blockquote> <p> } </p> <p> int _tmain(int argc, _TCHAR* argv[]) { </p> <blockquote> <p> boost::thread th = boost::thread(boost::bind(&amp;fTest)); </p> </blockquote> <blockquote> <p> while(1) { </p> <blockquote> <p> cv.notify_one(); boost::this_thread::sleep(boost::posix_time::seconds(1)); </p> </blockquote> <p> } </p> </blockquote> <blockquote> <p> return 0; </p> </blockquote> <p> } </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7772 Trac 1.4.3 viboes Fri, 07 Dec 2012 10:26:25 GMT <link>https://svn.boost.org/trac10/ticket/7772#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7772#comment:1</guid> <description> <p> Please, could you check if this is a duplicated of <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7657" title="#7657: Bugs: Serious performance and memory consumption hit if condition_variable ... (closed: fixed)">#7657</a>? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Fri, 07 Dec 2012 11:11:45 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7772#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7772#comment:2</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/7772#comment:1" title="Comment 1">viboes</a>: </p> <blockquote class="citation"> <p> Please, could you check if this is a duplicated of <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7657" title="#7657: Bugs: Serious performance and memory consumption hit if condition_variable ... (closed: fixed)">#7657</a>? </p> </blockquote> <p> Yes, It's the same problem. It occurs in MSVS08 too. I shouldn't have sent this ticket, but I didn't see <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7657" title="#7657: Bugs: Serious performance and memory consumption hit if condition_variable ... (closed: fixed)">#7657</a> I'm sorry </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Fri, 07 Dec 2012 18:06:04 GMT</pubDate> <title>status changed; resolution set; milestone deleted https://svn.boost.org/trac10/ticket/7772#comment:3 https://svn.boost.org/trac10/ticket/7772#comment:3 <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">duplicate</span> </li> <li><strong>milestone</strong> <span class="trac-field-deleted">To Be Determined</span> </li> </ul> Ticket