async-ify xenstore and xenclient

This commit is contained in:
Alex Zenla
2024-02-23 04:37:53 +00:00
parent cf0b62c9f5
commit 79acf4e814
15 changed files with 395 additions and 294 deletions

View File

@ -36,9 +36,9 @@ impl NetworkService {
impl NetworkService {
pub async fn watch(&mut self) -> Result<()> {
let mut collector = AutoNetworkCollector::new()?;
let mut collector = AutoNetworkCollector::new().await?;
loop {
let changeset = collector.read_changes()?;
let changeset = collector.read_changes().await?;
self.process_network_changeset(&mut collector, changeset)?;
sleep(Duration::from_secs(2)).await;
}