aquatic_udp: use features "with-glommio" and (default) "with-mio"

This commit is contained in:
Joakim Frostegård 2021-10-23 22:27:42 +02:00
parent f69e3a00c7
commit 13d0224321
3 changed files with 24 additions and 8 deletions

View file

@ -10,8 +10,9 @@ use cfg_if::cfg_if;
pub mod common;
pub mod config;
#[cfg(all(feature = "io_uring", target_os = "linux"))]
#[cfg(all(feature = "with-glommio", target_os = "linux"))]
pub mod glommio;
#[cfg(feature = "with-mio")]
pub mod mio;
use config::Config;
@ -21,7 +22,7 @@ pub const APP_NAME: &str = "aquatic_udp: UDP BitTorrent tracker";
pub fn run(config: Config) -> ::anyhow::Result<()> {
cfg_if! {
if #[cfg(all(feature = "io_uring", target_os = "linux"))] {
if #[cfg(all(feature = "with-glommio", target_os = "linux"))] {
glommio::run(config)
} else {
mio::run(config)