1
0
Fork 0
mirror of https://github.com/rust-unofficial/awesome-rust.git synced 2024-11-20 11:36:11 -05:00

Various debug for checks

This commit is contained in:
Tom Parker-Shemilt 2020-06-02 22:24:49 +01:00
parent 17a9fbf524
commit 25084b928a

View file

@ -92,15 +92,17 @@ impl MaxHandles {
return Handle { parent: self };
}
}
debug!("Sleeping for handle");
task::sleep(time::Duration::from_millis(500)).await;
debug!("Awoke from sleeping");
}
}
}
impl<'a> Drop for Handle<'a> {
fn drop(&mut self) {
debug!("Dropping");
self.parent.remaining.fetch_add(1, Ordering::Relaxed);
let remaining = self.parent.remaining.fetch_add(1, Ordering::Relaxed);
debug!("Dropping (remaining {})", remaining);
}
}
@ -317,7 +319,7 @@ async fn main() -> Result<(), Error> {
let mut not_written = 0;
let mut last_written = Local::now();
while url_checks.len() > 0 {
debug!("Waiting...");
debug!("Waiting for {}", url_checks.len());
let ((url, res), _index, remaining) = select_all(url_checks).await;
url_checks = remaining;
match res {