curl dns 2026, part IV, threads
In part I, part II and
part III I talked
about the changes to DNS resolution in curl and why we do them. In this
post I cover the performance/resources related changes in the
threaded resolver. This is the most common build option, deployed
by many distros.
Previously…
In curl 8.19.0 and earlier, the “threaded resolver” means libcurl
starts a new thread to call getaddrinfo(), as I explained in
part II. In addition, it opens a socketpair
(or eventfd on modern linux), so the resolver thread can notify
the “main” thread it’s done.

