Browse Source

ntex: set number of workers (#8569)

Nikolay Kim 1 year ago
parent
commit
f01f4e5fec

+ 1 - 1
frameworks/Rust/ntex/src/main.rs

@@ -58,7 +58,7 @@ async fn main() -> std::io::Result<()> {
                 .client_timeout(Seconds(0))
                 .h1(web::App::new().service(json).service(plaintext).finish())
         })?
-        .workers(num_cpus::get_physical())
+        .workers(num_cpus::get())
         .run()
         .await
 }

+ 1 - 1
frameworks/Rust/ntex/src/main_db.rs

@@ -99,7 +99,7 @@ async fn main() -> std::io::Result<()> {
                 .client_timeout(Seconds(0))
                 .h1(AppFactory)
         })?
-        .workers(num_cpus::get_physical())
+        .workers(num_cpus::get())
         .run()
         .await
 }

+ 1 - 1
frameworks/Rust/ntex/src/main_plt.rs

@@ -87,7 +87,7 @@ async fn main() -> io::Result<()> {
                 codec: h1::Codec::default(),
             })
         })?
-        .workers(num_cpus::get_physical())
+        .workers(num_cpus::get())
         .run()
         .await
 }