Skip to content

Commit

Permalink
Revert "fix Rust"
Browse files Browse the repository at this point in the history
This reverts commit 0529246.
  • Loading branch information
ibc committed Aug 12, 2024
1 parent 272b262 commit 62f0bf4
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions rust/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,8 @@ pub struct WorkerSettings {
/// "WebRTC-Bwe-AlrLimitedBackoff/Enabled/".
#[doc(hidden)]
pub libwebrtc_field_trials: Option<String>,
/// 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<bool>,
/// 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<Arc<dyn Fn() + Send + Sync>>,
Expand Down Expand Up @@ -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(),
}
Expand All @@ -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;
Expand All @@ -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"),
Expand Down Expand Up @@ -364,7 +361,7 @@ impl Inner {
rtc_port_range,
dtls_files,
libwebrtc_field_trials,
enable_liburing,
disable_liburing,
thread_initializer,
app_data,
}: WorkerSettings,
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 62f0bf4

Please sign in to comment.