@@ -192,11 +192,8 @@ pub struct WorkerSettings {
192
192
/// "WebRTC-Bwe-AlrLimitedBackoff/Enabled/".
193
193
#[ doc( hidden) ]
194
194
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 > ,
200
197
/// Function that will be called under worker thread before worker starts, can be used for
201
198
/// pinning worker threads to CPU cores.
202
199
pub thread_initializer : Option < Arc < dyn Fn ( ) + Send + Sync > > ,
@@ -226,7 +223,7 @@ impl Default for WorkerSettings {
226
223
rtc_port_range : 10000 ..=59999 ,
227
224
dtls_files : None ,
228
225
libwebrtc_field_trials : None ,
229
- enable_liburing : true ,
226
+ disable_liburing : None ,
230
227
thread_initializer : None ,
231
228
app_data : AppData :: default ( ) ,
232
229
}
@@ -241,7 +238,7 @@ impl fmt::Debug for WorkerSettings {
241
238
rtc_port_range,
242
239
dtls_files,
243
240
libwebrtc_field_trials,
244
- enable_liburing ,
241
+ disable_liburing ,
245
242
thread_initializer,
246
243
app_data,
247
244
} = self ;
@@ -252,7 +249,7 @@ impl fmt::Debug for WorkerSettings {
252
249
. field ( "rtc_port_range" , & rtc_port_range)
253
250
. field ( "dtls_files" , & dtls_files)
254
251
. field ( "libwebrtc_field_trials" , & libwebrtc_field_trials)
255
- . field ( "enable_liburing " , & enable_liburing )
252
+ . field ( "disable_liburing " , & disable_liburing )
256
253
. field (
257
254
"thread_initializer" ,
258
255
& thread_initializer. as_ref ( ) . map ( |_| "ThreadInitializer" ) ,
@@ -364,7 +361,7 @@ impl Inner {
364
361
rtc_port_range,
365
362
dtls_files,
366
363
libwebrtc_field_trials,
367
- enable_liburing ,
364
+ disable_liburing ,
368
365
thread_initializer,
369
366
app_data,
370
367
} : WorkerSettings ,
@@ -413,8 +410,8 @@ impl Inner {
413
410
) ) ;
414
411
}
415
412
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" ) ) ;
418
415
}
419
416
420
417
let id = WorkerId :: new ( ) ;
0 commit comments