mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 07:54:05 +01:00
ircd::ctx: Hoist adjoindre class member to static.
This commit is contained in:
parent
f026e81a07
commit
bbefffe2ac
2 changed files with 7 additions and 2 deletions
|
@ -68,6 +68,11 @@ ircd::ctx::ctx::ios_handler
|
|||
decltype(ircd::ctx::ctx::spawning)
|
||||
ircd::ctx::ctx::spawning;
|
||||
|
||||
/// Used to notify of context completion
|
||||
[[gnu::visibility("hidden")]]
|
||||
decltype(ircd::ctx::ctx::adjoindre)
|
||||
ircd::ctx::ctx::adjoindre;
|
||||
|
||||
/// Internal context struct ctor
|
||||
ircd::ctx::ctx::ctx(const string_view &name,
|
||||
const ircd::ctx::stack &stack,
|
||||
|
@ -1283,7 +1288,7 @@ ircd::ctx::context::join()
|
|||
|
||||
assert(bool(c));
|
||||
mark(prof::event::JOIN);
|
||||
c->adjoindre.wait([this]
|
||||
ctx::adjoindre.wait([this]
|
||||
{
|
||||
return joined();
|
||||
});
|
||||
|
|
|
@ -34,6 +34,7 @@ struct ircd::ctx::ctx
|
|||
static ios::descriptor ios_desc;
|
||||
static ios::handler ios_handler;
|
||||
static ctx *spawning;
|
||||
static dock adjoindre; // contexts waiting for join
|
||||
|
||||
uint64_t id {++id_ctr}; // Unique runtime ID
|
||||
string_view name; // User given name (optional)
|
||||
|
@ -47,7 +48,6 @@ struct ircd::ctx::ctx
|
|||
list::node node; // node for ctx::list
|
||||
ircd::ctx::stack stack; // stack related structure
|
||||
prof::ticker profile; // prof related structure
|
||||
dock adjoindre; // contexts waiting for this to join()
|
||||
|
||||
bool started() const noexcept; // context was ever entered
|
||||
bool finished() const noexcept; // context will not be further entered.
|
||||
|
|
Loading…
Reference in a new issue