udp: remove io_uring version, it is slower than mio version

This commit is contained in:
Joakim Frostegård 2021-11-18 22:18:45 +01:00
parent 99632d4be5
commit 138ae710ef
7 changed files with 10 additions and 551 deletions

View file

@ -1,10 +1,7 @@
pub mod common;
pub mod config;
pub mod handlers;
#[cfg(feature = "with-mio")]
pub mod network_mio;
#[cfg(feature = "with-io-uring")]
pub mod network_uring;
pub mod network;
pub mod tasks;
use config::Config;
@ -96,25 +93,13 @@ pub fn run(config: Config) -> ::anyhow::Result<()> {
WorkerIndex::SocketWorker(i),
);
cfg_if::cfg_if!(
if #[cfg(feature = "with-io-uring")] {
network_uring::run_socket_worker(
state,
config,
request_sender,
response_receiver,
num_bound_sockets,
);
} else {
network_mio::run_socket_worker(
state,
config,
i,
request_sender,
response_receiver,
num_bound_sockets,
);
}
network::run_socket_worker(
state,
config,
i,
request_sender,
response_receiver,
num_bound_sockets,
);
})
.with_context(|| "spawn socket worker")?;