2
0
mirror of https://github.com/boostorg/fiber.git synced 2026-02-12 12:02:54 +00:00

use atomic operations

This commit is contained in:
Oliver Kowalke
2012-12-31 11:34:02 +01:00
parent df45e885d2
commit 77e1b216e0
19 changed files with 464 additions and 186 deletions

View File

@@ -48,7 +48,7 @@ condition::notify_one()
{
f.swap( waiting_.front() );
waiting_.pop_front();
} while ( f->is_complete() );
} while ( f->is_terminated() );
if ( f)
detail::scheduler::instance().notify( f);
}
@@ -70,7 +70,7 @@ condition::notify_all()
{
BOOST_FOREACH( detail::fiber_base::ptr_t const& f, waiting_)
{
if ( ! f->is_complete() )
if ( ! f->is_terminated() )
detail::scheduler::instance().notify( f);
}
waiting_.clear();