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:
parent
d4c51a2d45
commit
85d4a4f5ed
1 changed files with 11 additions and 2 deletions
11
ircd/ctx.cc
11
ircd/ctx.cc
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue