Open vi opened 6 years ago
I'm sure it's possible. However, it's not a goal I'd personally strive for. If someone wanted to do the work to get something like that, cool!
reqwest creates at least 1 extra thread so that it can run multiple requests in parallel. It creates 4 additional threads as workers for blocking DNS. With some work, we could eventually have non-blocking DNS, and thus not need separate threads for it.
It makes sence if the program is going to issue more than one request. If it is a little command-line tool that just does some one request, another approach may be preferrable.
@vi you can get that using the trust-dns
feature, at the cost of increased binary size and longer build times.
Can reqwest work without threading?
If
reqwest
is used just to make one little puny REST request, it looks like overkill to bring up all that machinery.This may make easier to embed
reqwest
-using libraries into other [non-Rust] applications.