aquatic_udp: glommio: use signals for access list update

This commit is contained in:
Joakim Frostegård 2021-11-02 22:23:47 +01:00
parent a4d131359c
commit fdaafae4b7
7 changed files with 97 additions and 105 deletions

View file

@ -1,9 +1,6 @@
use std::sync::{atomic::AtomicUsize, Arc};
use std::thread::Builder;
use std::time::Duration;
use std::{
ops::Deref,
sync::{atomic::AtomicUsize, Arc},
};
use anyhow::Context;
use aquatic_common::privileges::drop_privileges_after_socket_binding;
@ -146,10 +143,7 @@ pub fn run_inner(config: Config, state: State) -> ::anyhow::Result<()> {
loop {
::std::thread::sleep(Duration::from_secs(config.cleaning.interval));
state
.torrents
.lock()
.clean(&config, state.access_list.load_full().deref());
state.torrents.lock().clean(&config, &state.access_list);
}
}