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

allocate worker_fiber on fiber's stack

This commit is contained in:
Oliver Kowalke
2014-03-20 18:14:46 +01:00
parent 687df5744f
commit ba010422f1
10 changed files with 271 additions and 313 deletions

View File

@@ -24,7 +24,10 @@ namespace fibers {
void
fiber::start_fiber_()
{ detail::scheduler::instance()->spawn( impl_); }
{
impl_->set_ready();
detail::scheduler::instance()->spawn( impl_);
}
int
fiber::priority() const BOOST_NOEXCEPT
@@ -80,7 +83,7 @@ fiber::join()
detail::worker_fiber * tmp = 0;
std::swap( tmp, impl_);
// check if joined fiber was interrupted
exception_ptr except( tmp->exception() );
exception_ptr except( tmp->get_exception() );
tmp->deallocate();
if ( except)
rethrow_exception( except);