-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Labels
help wantedExtra attention is neededExtra attention is needed
Description
Code to reproduce:
use compio::time::sleep;
use cyper::Client;
use http::Version;
use std::time::Duration;
#[compio::main]
async fn main() {
let client = Client::new();
println!("Send request 1");
let response = client
.get("https://example.com/")
.unwrap()
.version(Version::HTTP_2)
.send()
.await
.unwrap();
println!("Request 1 done, sleeping");
sleep(Duration::from_secs(180)).await;
println!("Send request 2");
client
.get("https://example.com/")
.unwrap()
.version(Version::HTTP_2)
.send()
.await
.unwrap();
println!("Now check your CPU usage");
loop {
sleep(Duration::from_secs(600)).await;
}
}
Debugger shows that the task is being woken up unconditionally in h2's Connection::poll without any scheduling. Initial investigation might indicate the following issues:
- The shutdown op in cyper (or compio) never finishes in this scenario, and/or
- The h2 crate never considers a runtime where shutdown does not return
Poll::Ready
immediately, leading to a flawedpoll
implementation.
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed