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:
parent
17a9fbf524
commit
25084b928a
1 changed files with 5 additions and 3 deletions
|
@ -92,15 +92,17 @@ impl MaxHandles {
|
||||||
return Handle { parent: self };
|
return Handle { parent: self };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
debug!("Sleeping for handle");
|
||||||
task::sleep(time::Duration::from_millis(500)).await;
|
task::sleep(time::Duration::from_millis(500)).await;
|
||||||
|
debug!("Awoke from sleeping");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Drop for Handle<'a> {
|
impl<'a> Drop for Handle<'a> {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
debug!("Dropping");
|
let remaining = self.parent.remaining.fetch_add(1, Ordering::Relaxed);
|
||||||
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 not_written = 0;
|
||||||
let mut last_written = Local::now();
|
let mut last_written = Local::now();
|
||||||
while url_checks.len() > 0 {
|
while url_checks.len() > 0 {
|
||||||
debug!("Waiting...");
|
debug!("Waiting for {}", url_checks.len());
|
||||||
let ((url, res), _index, remaining) = select_all(url_checks).await;
|
let ((url, res), _index, remaining) = select_all(url_checks).await;
|
||||||
url_checks = remaining;
|
url_checks = remaining;
|
||||||
match res {
|
match res {
|
||||||
|
|
Loading…
Reference in a new issue