Skip to content

Commit 62f0bf4

Browse files
committed
Revert "fix Rust"
This reverts commit 0529246.
1 parent 272b262 commit 62f0bf4

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

rust/src/worker.rs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,8 @@ pub struct WorkerSettings {
192192
/// "WebRTC-Bwe-AlrLimitedBackoff/Enabled/".
193193
#[doc(hidden)]
194194
pub libwebrtc_field_trials: Option<String>,
195-
/// Enable liburing This option is ignored if io_uring is not supported by
196-
/// current host.
197-
///
198-
/// Default `true`.
199-
pub enable_liburing: bool,
195+
/// Disable liburing (io_uring) despite it's supported in current host.
196+
pub disable_liburing: Option<bool>,
200197
/// Function that will be called under worker thread before worker starts, can be used for
201198
/// pinning worker threads to CPU cores.
202199
pub thread_initializer: Option<Arc<dyn Fn() + Send + Sync>>,
@@ -226,7 +223,7 @@ impl Default for WorkerSettings {
226223
rtc_port_range: 10000..=59999,
227224
dtls_files: None,
228225
libwebrtc_field_trials: None,
229-
enable_liburing: true,
226+
disable_liburing: None,
230227
thread_initializer: None,
231228
app_data: AppData::default(),
232229
}
@@ -241,7 +238,7 @@ impl fmt::Debug for WorkerSettings {
241238
rtc_port_range,
242239
dtls_files,
243240
libwebrtc_field_trials,
244-
enable_liburing,
241+
disable_liburing,
245242
thread_initializer,
246243
app_data,
247244
} = self;
@@ -252,7 +249,7 @@ impl fmt::Debug for WorkerSettings {
252249
.field("rtc_port_range", &rtc_port_range)
253250
.field("dtls_files", &dtls_files)
254251
.field("libwebrtc_field_trials", &libwebrtc_field_trials)
255-
.field("enable_liburing", &enable_liburing)
252+
.field("disable_liburing", &disable_liburing)
256253
.field(
257254
"thread_initializer",
258255
&thread_initializer.as_ref().map(|_| "ThreadInitializer"),
@@ -364,7 +361,7 @@ impl Inner {
364361
rtc_port_range,
365362
dtls_files,
366363
libwebrtc_field_trials,
367-
enable_liburing,
364+
disable_liburing,
368365
thread_initializer,
369366
app_data,
370367
}: WorkerSettings,
@@ -413,8 +410,8 @@ impl Inner {
413410
));
414411
}
415412

416-
if enable_liburing {
417-
spawn_args.push("--disable_liburing".to_string());
413+
if let Some(disable_liburing) = disable_liburing {
414+
spawn_args.push(format!("--disable_liburing"));
418415
}
419416

420417
let id = WorkerId::new();

0 commit comments

Comments
 (0)