From ee565aa1a7cb1d08085bc373c4bbd3747226b32d Mon Sep 17 00:00:00 2001 From: Oliver Kowalke Date: Mon, 28 Jan 2013 18:07:11 +0100 Subject: [PATCH] unlock in mutex more efficient --- src/mutex.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/mutex.cpp b/src/mutex.cpp index 84a80c20..2ef2eeb1 100644 --- a/src/mutex.cpp +++ b/src/mutex.cpp @@ -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(); } }