mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 10:45:30 +00:00
aquatic_udp: glommio: use signals for access list update
This commit is contained in:
parent
a4d131359c
commit
fdaafae4b7
7 changed files with 97 additions and 105 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue