mirror of
https://github.com/boostorg/fiber.git
synced 2026-02-02 08:52:07 +00:00
unlock in mutex more efficient
This commit is contained in:
@@ -57,10 +57,8 @@ mutex::unlock()
|
||||
unique_lock< detail::spinlock > lk( waiting_mtx_);
|
||||
if ( ! waiting_.empty() )
|
||||
{
|
||||
detail::fiber_base::ptr_t f;
|
||||
f.swap( waiting_.front() );
|
||||
waiting_.front()->wake_up();
|
||||
waiting_.pop_front();
|
||||
f->wake_up();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user