diff --git a/actix-server/CHANGES.md b/actix-server/CHANGES.md index 968d905e..82971c82 100644 --- a/actix-server/CHANGES.md +++ b/actix-server/CHANGES.md @@ -4,7 +4,7 @@ ### Added -* Allow to run future before server service initialization +* `SystemRuntime::on_start()` - allow to run future before server service initialization ## [0.4.0] - 2019-03-12 diff --git a/actix-server/src/config.rs b/actix-server/src/config.rs index 8f360e14..62b9e2a6 100644 --- a/actix-server/src/config.rs +++ b/actix-server/src/config.rs @@ -215,7 +215,7 @@ impl ServiceRuntime { } /// Execute future before services initialization. - pub fn spawn(&mut self, fut: F) + pub fn on_start(&mut self, fut: F) where F: Future + 'static, {