0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 10:12:39 +01:00

ircd::ctx: Consistent use of interruption.

This commit is contained in:
Jason Volk 2018-08-19 18:29:46 -07:00
parent 38c5679b5a
commit 10434c96c5

View file

@ -925,7 +925,7 @@ noexcept
// Can't join to bare metal, only from within another context.
if(current)
{
terminate();
interrupt();
join();
return;
}
@ -993,7 +993,7 @@ ircd::ctx::pool::pool(const char *const &name,
ircd::ctx::pool::~pool()
noexcept
{
terminate();
interrupt();
join();
assert(ctxs.empty());
assert(queue.empty());
@ -1021,10 +1021,7 @@ ircd::ctx::pool::del(const size_t &num)
const uninterruptible ui;
while(ctxs.size() > target)
{
ctxs.back().terminate();
ctxs.pop_back();
}
}
void
@ -1037,10 +1034,7 @@ ircd::ctx::pool::add(const size_t &num)
void
ircd::ctx::pool::join()
{
for(auto &context : ctxs)
context.join();
ctxs.clear();
del(size());
}
void