mirror of
https://github.com/boostorg/fiber.git
synced 2026-02-13 00:12:17 +00:00
fix bug related to fiber::join()
This commit is contained in:
@@ -59,11 +59,14 @@ fiber::join()
|
||||
system::errc::invalid_argument, "boost fiber: fiber not joinable") );
|
||||
}
|
||||
|
||||
ptr_t impl_old;
|
||||
// reset impl_ now, BEFORE calling join(), so it's reset even if join()
|
||||
// throws
|
||||
impl_old.swap(impl_);
|
||||
detail::scheduler::instance()->join(impl_old);
|
||||
try
|
||||
{ detail::scheduler::instance()->join( impl_); }
|
||||
catch (...)
|
||||
{
|
||||
impl_.reset();
|
||||
throw;
|
||||
}
|
||||
impl_.reset();
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user