|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r85733 - trunk/boost/thread/win32
From: vicente.botet_at_[hidden]
Date: 2013-09-17 17:01:06
Author: viboes
Date: 2013-09-17 17:01:05 EDT (Tue, 17 Sep 2013)
New Revision: 85733
URL: http://svn.boost.org/trac/boost/changeset/85733
Log:
Thread: try to fix win32 condition_variable issue #7461.
Text files modified:
trunk/boost/thread/win32/condition_variable.hpp | 11 +++++------
trunk/boost/thread/win32/thread_data.hpp | 2 +-
2 files changed, 6 insertions(+), 7 deletions(-)
Modified: trunk/boost/thread/win32/condition_variable.hpp
==============================================================================
--- trunk/boost/thread/win32/condition_variable.hpp Tue Sep 17 16:57:46 2013 (r85732)
+++ trunk/boost/thread/win32/condition_variable.hpp 2013-09-17 17:01:05 EDT (Tue, 17 Sep 2013) (r85733)
@@ -191,18 +191,17 @@
struct entry_manager
{
entry_ptr const entry;
+ boost::mutex& internal_mutex;
BOOST_THREAD_NO_COPYABLE(entry_manager)
- entry_manager(entry_ptr const& entry_):
- entry(entry_)
+ entry_manager(entry_ptr const& entry_, boost::mutex& mutex_):
+ entry(entry_), internal_mutex(mutex_)
{}
~entry_manager()
{
- //if(! entry->is_notified()) // several regression #7657
- {
+ boost::lock_guard<boost::mutex> internal_lock(internal_mutex);
entry->remove_waiter();
- }
}
list_entry* operator->()
@@ -218,7 +217,7 @@
{
relocker<lock_type> locker(lock);
- entry_manager entry(get_wait_entry());
+ entry_manager entry(get_wait_entry(), internal_mutex);
locker.unlock();
Modified: trunk/boost/thread/win32/thread_data.hpp
==============================================================================
--- trunk/boost/thread/win32/thread_data.hpp Tue Sep 17 16:57:46 2013 (r85732)
+++ trunk/boost/thread/win32/thread_data.hpp 2013-09-17 17:01:05 EDT (Tue, 17 Sep 2013) (r85733)
@@ -148,7 +148,7 @@
virtual void run()=0;
- void notify_all_at_thread_exit(condition_variable* cv, mutex* m)
+ virtual void notify_all_at_thread_exit(condition_variable* cv, mutex* m)
{
notify.push_back(std::pair<condition_variable*, mutex*>(cv, m));
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk