merge System struct in io_uring feature

This commit is contained in:
wireless4024 2023-02-12 20:43:39 +07:00
parent be4f8f97b6
commit d700dc2bbb
No known key found for this signature in database
GPG Key ID: D102C2A868192A39
1 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@ pub struct System {
arbiter_handle: ArbiterHandle, arbiter_handle: ArbiterHandle,
} }
#[cfg(not(feature = "io-uring"))] //#[cfg(not(feature = "io-uring"))]
impl System { impl System {
/// Create a new system. /// Create a new system.
/// ///
@ -48,7 +48,7 @@ impl System {
/// [tokio-runtime]: tokio::runtime::Runtime /// [tokio-runtime]: tokio::runtime::Runtime
pub fn with_tokio_rt<F>(runtime_factory: F) -> SystemRunner pub fn with_tokio_rt<F>(runtime_factory: F) -> SystemRunner
where where
F: Fn() -> tokio::runtime::Runtime, F: Fn() -> crate::runtime::GlobalRuntime,
{ {
let (stop_tx, stop_rx) = oneshot::channel(); let (stop_tx, stop_rx) = oneshot::channel();
let (sys_tx, sys_rx) = mpsc::unbounded_channel(); let (sys_tx, sys_rx) = mpsc::unbounded_channel();
@ -69,7 +69,7 @@ impl System {
SystemRunner { rt, stop_rx } SystemRunner { rt, stop_rx }
} }
} }
/*
#[cfg(feature = "io-uring")] #[cfg(feature = "io-uring")]
impl System { impl System {
/// Create a new system. /// Create a new system.
@ -113,7 +113,7 @@ impl System {
let rt = crate::runtime::Runtime::from(rt); let rt = crate::runtime::Runtime::from(rt);
SystemRunner { rt, stop_rx } SystemRunner { rt, stop_rx }
} }
} }*/
impl System { impl System {
/// Constructs new system and registers it on the current thread. /// Constructs new system and registers it on the current thread.