2
0
mirror of https://github.com/boostorg/fiber.git synced 2026-02-11 23:52:29 +00:00

mutex' call lk.unlock() instead splk_.unlock()

This commit is contained in:
Oliver Kowalke
2013-10-18 20:29:18 +02:00
parent bc4478c599
commit bdbe2ea1f7
4 changed files with 22 additions and 22 deletions

View File

@@ -56,7 +56,7 @@ recursive_mutex::lock()
unique_lock< detail::spinlock > lk( splk_);
// store this fiber in order to be notified later
waiting_.push_back( n);
splk_.unlock();
lk.unlock();
// TODO: prevent notification (set_ready()) of fiber before set to waiting-state
// suspend this fiber
@@ -71,7 +71,7 @@ recursive_mutex::lock()
unique_lock< detail::spinlock > lk( splk_);
// store this fiber in order to be notified later
waiting_.push_back( n);
splk_.unlock();
lk.unlock();
// wait until main-fiber gets notified
while ( ! n->is_ready() )
@@ -127,7 +127,7 @@ recursive_mutex::unlock()
n.swap( waiting_.front() );
waiting_.pop_front();
}
splk_.unlock();
lk.unlock();
owner_ = detail::fiber_base::id();
state_ = UNLOCKED;