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

interruption

This commit is contained in:
Oliver Kowalke
2013-01-10 19:51:34 +01:00
parent f18136562f
commit cff07a3645
10 changed files with 158 additions and 74 deletions

View File

@@ -47,7 +47,7 @@ void
fiber::join()
{
BOOST_ASSERT( impl_);
#if 0
if ( boost::this_fiber::is_fiberized() && boost::this_fiber::get_id() == get_id() )
boost::throw_exception(
fiber_resource_error(
@@ -57,12 +57,20 @@ fiber::join()
boost::throw_exception(
fiber_resource_error(
system::errc::invalid_argument, "boost fiber: fiber not joinable") );
#endif
detail::scheduler::instance().join( impl_);
BOOST_ASSERT( impl_->is_terminated() );
}
void
fiber::interrupt()
{
BOOST_ASSERT( impl_);
impl_->request_interruption();
}
void
fiber::cancel()
{