2
0
mirror of https://github.com/boostorg/fiber.git synced 2026-02-18 14:02:18 +00:00

move re-locking of external lock in branch

This commit is contained in:
Oliver Kowalke
2013-12-29 21:03:26 +01:00
parent bcffcfcc00
commit baa2828df6

View File

@@ -96,6 +96,9 @@ public:
// this fiber was notified and resumed
// check if fiber was interrupted
this_fiber::interruption_point();
// lock external again before returning
lt.lock();
}
else
{
@@ -120,6 +123,9 @@ public:
while ( ! n->is_ready() )
// run scheduler
detail::scheduler::instance()->run();
// lock external again before returning
lt.lock();
}
}
catch (...)
@@ -130,9 +136,6 @@ public:
std::find( waiting_.begin(), waiting_.end(), n) );
throw;
}
// lock external again before returning
lt.lock();
}
template< typename LockType >
@@ -172,6 +175,9 @@ public:
// check if fiber was interrupted
this_fiber::interruption_point();
// lock external again before returning
lt.lock();
}
else
{
@@ -210,6 +216,9 @@ public:
// run scheduler
detail::scheduler::instance()->run();
}
// lock external again before returning
lt.lock();
}
}
catch (...)
@@ -221,9 +230,6 @@ public:
throw;
}
// lock external again before returning
lt.lock();
return status;
}