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

uses intrusive::list<> isntread hand-written queues

This commit is contained in:
Oliver Kowalke
2015-09-09 19:22:54 +02:00
parent e4fc7e7736
commit c89410dfd8
27 changed files with 334 additions and 619 deletions

View File

@@ -63,8 +63,8 @@ recursive_mutex::lock() {
}
// store this fiber in order to be notified later
BOOST_ASSERT( waiting_.end() == std::find( waiting_.begin(), waiting_.end(), f) );
waiting_.push_back( f);
BOOST_ASSERT( ! f->wait_is_linked() );
waiting_.push_back( * f);
// suspend this fiber
context::active()->do_wait( lk);
@@ -95,7 +95,7 @@ recursive_mutex::unlock() {
context * f( nullptr);
if ( 0 == --count_) {
if ( ! waiting_.empty() ) {
f = waiting_.front();
f = & waiting_.front();
waiting_.pop_front();
BOOST_ASSERT( nullptr != f);
}