mirror of
https://github.com/boostorg/thread.git
synced 2026-02-02 09:22:10 +00:00
@@ -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();
|
||||
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user