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

support of detaching fibers added

This commit is contained in:
Oliver Kowalke
2015-09-22 19:04:48 +02:00
parent 6ad6579666
commit 38aa1f4366
4 changed files with 81 additions and 5 deletions

View File

@@ -49,6 +49,15 @@ fiber::interrupt() noexcept {
context::active()->set_ready( impl_.get() );
}
void
fiber::detach() noexcept {
if ( ! joinable() ) {
throw fiber_resource_error( static_cast< int >( std::errc::invalid_argument),
"boost fiber: fiber not joinable");
}
impl_.reset();
}
}}
#ifdef BOOST_HAS_ABI_HEADERS