0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-17 15:30:52 +01:00

ircd::ctx: Further tweak interruption masking semantics.

This commit is contained in:
Jason Volk 2018-08-19 20:10:51 -07:00
parent d4c51a2d45
commit 85d4a4f5ed

View file

@ -577,8 +577,18 @@ ircd::ctx::this_ctx::stack_at_here()
void void
ircd::ctx::this_ctx::interruptible(const bool &b) ircd::ctx::this_ctx::interruptible(const bool &b)
{ {
const bool theirs
{
interruptible(cur())
};
if(theirs && !b)
interruption_point();
interruptible(cur(), b); interruptible(cur(), b);
interruption_point();
if(!theirs && b)
interruption_point();
} }
/// Throws interrupted if the currently running context was interrupted /// Throws interrupted if the currently running context was interrupted
@ -1023,7 +1033,6 @@ ircd::ctx::pool::del(const size_t &num)
size_t(std::max(requested, 0L)) size_t(std::max(requested, 0L))
}; };
const uninterruptible ui;
while(ctxs.size() > target) while(ctxs.size() > target)
ctxs.pop_back(); ctxs.pop_back();
} }