construct: Simplify run::level wait mechanism on init.
This commit is contained in:
parent
2604f1370a
commit
4ff9176086
|
@ -146,14 +146,8 @@ construct::console::main()
|
|||
construct::console = nullptr;
|
||||
}};
|
||||
|
||||
if(!wait_running())
|
||||
return;
|
||||
|
||||
ircd::module module
|
||||
{
|
||||
"console"
|
||||
};
|
||||
|
||||
ircd::run::barrier<ircd::ctx::terminated>{};
|
||||
ircd::module module{"console"};
|
||||
this->module = &module;
|
||||
loop();
|
||||
}
|
||||
|
@ -548,20 +542,6 @@ construct::console::on_runlevel(const enum ircd::run::level &runlevel)
|
|||
}
|
||||
}
|
||||
|
||||
bool
|
||||
construct::console::wait_running()
|
||||
const
|
||||
{
|
||||
ircd::run::changed::dock.wait([]
|
||||
{
|
||||
return ircd::run::level == ircd::run::level::RUN ||
|
||||
ircd::run::level == ircd::run::level::QUIT ||
|
||||
ircd::run::level == ircd::run::level::HALT;
|
||||
});
|
||||
|
||||
return ircd::run::level == ircd::run::level::RUN;
|
||||
}
|
||||
|
||||
void
|
||||
construct::console::show_message()
|
||||
const
|
||||
|
|
|
@ -31,7 +31,6 @@ struct construct::console
|
|||
|
||||
void show_message() const;
|
||||
void on_runlevel(const enum ircd::run::level &);
|
||||
bool wait_running() const;
|
||||
bool next_command();
|
||||
bool esc_handle_bra();
|
||||
bool esc_handle();
|
||||
|
|
Loading…
Reference in New Issue