2
0
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:
Oliver Kowalke
2013-09-28 08:20:59 +02:00
parent 2c2f5156e9
commit 73e87bc599

View File

@@ -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