2
0
mirror of https://github.com/boostorg/fiber.git synced 2026-02-17 01:32:32 +00:00

fix using intruisve::list<>

This commit is contained in:
Oliver Kowalke
2015-09-10 18:08:10 +02:00
parent 2173200c14
commit d3843efbe0
17 changed files with 184 additions and 157 deletions

View File

@@ -19,16 +19,16 @@ void
round_robin::awakened( context * f) {
BOOST_ASSERT( nullptr != f);
BOOST_ASSERT( ! f->state_is_linked() );
rqueue_.push_back( * f);
BOOST_ASSERT( ! f->runnable_is_linked() );
runnable_queue_.push_back( * f);
}
context *
round_robin::pick_next() {
context * victim( nullptr);
if ( ! rqueue_.empty() ) {
victim = & rqueue_.front();
rqueue_.pop_front();
if ( ! runnable_queue_.empty() ) {
victim = & runnable_queue_.front();
runnable_queue_.pop_front();
BOOST_ASSERT( nullptr != victim);
}
return victim;
@@ -36,7 +36,7 @@ round_robin::pick_next() {
std::size_t
round_robin::ready_fibers() const noexcept {
return rqueue_.size();
return runnable_queue_.size();
}
}}