2
0
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:
Oliver Kowalke
2013-01-28 18:07:11 +01:00
parent 95f989f9ac
commit ee565aa1a7

View File

@@ -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();
}
}