0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-05-29 00:03:45 +02:00

ircd::ctx::pool: Simplify notify on work completion.

This commit is contained in:
Jason Volk 2021-05-02 14:02:28 -07:00
parent 5534672a07
commit d4e41218b0
2 changed files with 6 additions and 6 deletions

View file

@ -35,6 +35,7 @@ struct ircd::ctx::pool
queue<closure> q;
std::vector<context> ctxs;
private:
void work();
void main() noexcept;

View file

@ -1565,17 +1565,16 @@ try
q.pop()
};
const scope_notify notify
{
q_max
};
const scope_count working
{
this->working
};
const unwind avail{[this]()
noexcept
{
q_max.notify();
}};
// Execute the user's function
func();