mirror of
https://github.com/cloudflare/pingora.git
synced 2024-09-20 02:31:35 +02:00
feat: Change Server::run_forever to take ownership and ensure exit semantics
Includes-commit: b83da0f03e
Replicated-from: https://github.com/cloudflare/pingora/pull/176
This commit is contained in:
parent
7ea2ac970a
commit
5ea8c46696
2 changed files with 3 additions and 3 deletions
2
.bleep
2
.bleep
|
@ -1 +1 @@
|
|||
c413c5d1a2594cafa6d6c61829ffe3350afd677c
|
||||
f54615d5e74b9ab529695a1400250b54d47a4dd5
|
|
@ -289,7 +289,7 @@ impl Server {
|
|||
///
|
||||
/// Note: this function may fork the process for daemonization, so any additional threads created
|
||||
/// before this function will be lost to any service logic once this function is called.
|
||||
pub fn run_forever(&mut self) {
|
||||
pub fn run_forever(mut self) -> ! {
|
||||
info!("Server starting");
|
||||
|
||||
let conf = self.configuration.as_ref();
|
||||
|
@ -364,7 +364,7 @@ impl Server {
|
|||
}
|
||||
}
|
||||
info!("All runtimes exited, exiting now");
|
||||
std::process::exit(0);
|
||||
std::process::exit(0)
|
||||
}
|
||||
|
||||
fn create_runtime(name: &str, threads: usize, work_steal: bool) -> Runtime {
|
||||
|
|
Loading…
Reference in a new issue