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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user