From 62f0bf46431927ee2fbd74950fe81cdd128707ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20Baz=20Castillo?= Date: Mon, 12 Aug 2024 11:19:32 +0200 Subject: [PATCH] Revert "fix Rust" This reverts commit 0529246e7668f97542bf850e386434cd5ca6012b. --- rust/src/worker.rs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/rust/src/worker.rs b/rust/src/worker.rs index fefcbd03ed..68a9ecbadd 100644 --- a/rust/src/worker.rs +++ b/rust/src/worker.rs @@ -192,11 +192,8 @@ pub struct WorkerSettings { /// "WebRTC-Bwe-AlrLimitedBackoff/Enabled/". #[doc(hidden)] pub libwebrtc_field_trials: Option, - /// Enable liburing This option is ignored if io_uring is not supported by - /// current host. - /// - /// Default `true`. - pub enable_liburing: bool, + /// Disable liburing (io_uring) despite it's supported in current host. + pub disable_liburing: Option, /// Function that will be called under worker thread before worker starts, can be used for /// pinning worker threads to CPU cores. pub thread_initializer: Option>, @@ -226,7 +223,7 @@ impl Default for WorkerSettings { rtc_port_range: 10000..=59999, dtls_files: None, libwebrtc_field_trials: None, - enable_liburing: true, + disable_liburing: None, thread_initializer: None, app_data: AppData::default(), } @@ -241,7 +238,7 @@ impl fmt::Debug for WorkerSettings { rtc_port_range, dtls_files, libwebrtc_field_trials, - enable_liburing, + disable_liburing, thread_initializer, app_data, } = self; @@ -252,7 +249,7 @@ impl fmt::Debug for WorkerSettings { .field("rtc_port_range", &rtc_port_range) .field("dtls_files", &dtls_files) .field("libwebrtc_field_trials", &libwebrtc_field_trials) - .field("enable_liburing", &enable_liburing) + .field("disable_liburing", &disable_liburing) .field( "thread_initializer", &thread_initializer.as_ref().map(|_| "ThreadInitializer"), @@ -364,7 +361,7 @@ impl Inner { rtc_port_range, dtls_files, libwebrtc_field_trials, - enable_liburing, + disable_liburing, thread_initializer, app_data, }: WorkerSettings, @@ -413,8 +410,8 @@ impl Inner { )); } - if enable_liburing { - spawn_args.push("--disable_liburing".to_string()); + if let Some(disable_liburing) = disable_liburing { + spawn_args.push(format!("--disable_liburing")); } let id = WorkerId::new();