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