2
0
mirror of https://github.com/boostorg/fiber.git synced 2026-02-13 00:12:17 +00:00

some stuff/corrections

This commit is contained in:
Oliver Kowalke
2015-06-19 18:55:02 +02:00
parent 9778fc8594
commit 61dc492f31
25 changed files with 31 additions and 32 deletions

View File

@@ -45,14 +45,17 @@ restore_interruption::~restore_interruption() noexcept {
}
}
BOOST_FIBERS_DECL
bool interruption_enabled() noexcept {
return ! fibers::detail::scheduler::instance()->active()->interruption_blocked();
}
BOOST_FIBERS_DECL
bool interruption_requested() noexcept {
return fibers::detail::scheduler::instance()->active()->interruption_requested();
}
BOOST_FIBERS_DECL
void interruption_point() {
if ( interruption_requested() && interruption_enabled() ) {
fibers::detail::scheduler::instance()->active()->request_interruption( false);