mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 10:45:30 +00:00
aquatic_udp: feature-gate glommio version
This commit is contained in:
parent
047d138b2b
commit
81b7777a4a
3 changed files with 16 additions and 4 deletions
|
|
@ -4,6 +4,7 @@ use aquatic_common::access_list::{AccessListArcSwap, AccessListMode, AccessListQ
|
|||
|
||||
pub mod common;
|
||||
pub mod config;
|
||||
#[cfg(all(feature = "with-glommio", target_os = "linux"))]
|
||||
pub mod glommio;
|
||||
pub mod mio;
|
||||
|
||||
|
|
@ -12,7 +13,13 @@ use config::Config;
|
|||
pub const APP_NAME: &str = "aquatic_udp: UDP BitTorrent tracker";
|
||||
|
||||
pub fn run(config: Config) -> ::anyhow::Result<()> {
|
||||
glommio::run(config)
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(all(feature = "with-glommio", target_os = "linux"))] {
|
||||
glommio::run(config)
|
||||
} else {
|
||||
mio::run(config)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn update_access_list(config: &Config, access_list: &Arc<AccessListArcSwap>) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue