2
0
mirror of https://github.com/boostorg/thread.git synced 2026-02-02 09:22:10 +00:00

Thread: try to fix win32 condition_variable issue #7461.

[SVN r85733]
This commit is contained in:
Vicente J. Botet Escriba
2013-09-17 21:01:05 +00:00
parent 5c78582794
commit fcc027369f
2 changed files with 6 additions and 7 deletions

View File

@@ -191,18 +191,17 @@ namespace boost
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 @@ namespace boost
{
relocker<lock_type> locker(lock);
entry_manager entry(get_wait_entry());
entry_manager entry(get_wait_entry(), internal_mutex);
locker.unlock();

View File

@@ -148,7 +148,7 @@ namespace boost
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));
}