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:
@@ -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();
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user