mirror of https://github.com/rwf2/Rocket.git
Fix deprecation warning: 'tokio::runtime::Builder::num_threads' -> 'core_threads'.
This commit is contained in:
parent
c9d0af09d6
commit
85761c08e3
|
@ -892,7 +892,7 @@ impl Rocket {
|
||||||
// Initialize the tokio runtime
|
// Initialize the tokio runtime
|
||||||
let mut runtime = tokio::runtime::Builder::new()
|
let mut runtime = tokio::runtime::Builder::new()
|
||||||
.threaded_scheduler()
|
.threaded_scheduler()
|
||||||
.num_threads(self.config.workers as usize)
|
.core_threads(self.config.workers as usize)
|
||||||
.enable_all()
|
.enable_all()
|
||||||
.build()
|
.build()
|
||||||
.expect("Cannot build runtime!");
|
.expect("Cannot build runtime!");
|
||||||
|
|
Loading…
Reference in New Issue