pub struct RefreshGuard {
handles: Vec<tokio::task::JoinHandle<()>>,
}
impl RefreshGuard {
pub fn from_handles(handles: Vec<tokio::task::JoinHandle<()>>) -> Self {
Self { handles }
}
}
impl Drop for RefreshGuard {
fn drop(&mut self) {
for handle in &self.handles {
handle.abort();
}
}
}