Closed WSL-Ben closed 3 months ago
You could use the async interface for that:
cpr::Session session;
cpr::AsyncResponse future = session.GetAsync();
// [...]
if(!future.valid() || future.wait_for(std::chrono::seconds{0}) == std::future_status::ready) {
return session;
}
Is your feature request related to a problem?
I am trying to create a list of Sessions that can be re-used as long-running connections, and would like to know if there is a method that can be used to determine whether a specific Session is currently busy or not.
An example of something similar to what I want to do:
Possible Solution
I have been unable to find any workaround or solution.
Alternatives
No response
Additional Context
No response