Is there a way to set the maximum pool size for a client in Reqwest?

Viewed 537

All I've found is that ClientBuilder has an option for setting the maximum idle connections per host, but this doesn't seem to give an overall limit to the number of connections available.

1 Answers

It looks like Reqwest works on top of Tokio. You can configure tokio::Runtime's thread count for the whole application.

Unfortunately, I didn't find a way to configure tokio::Runtime to use a separate thread pool for a particular library. Per-library configuration doesn't look possible from my point of view.

Related