0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-17 23:40:57 +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,7 +577,17 @@ 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);
if(!theirs && b)
interruption_point(); interruption_point();
} }
@ -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();
} }