Author: Uli Schlachter <psychon@...>
Date: 2012-02-14 (Tue, 14 Feb 2012)
Threaded DNS: Use a thread pool
When a DNS thread is done with its lookup, instead of existing immediately, it
now waits for another DNS lookup to do instead. This avoids the cost of
starting/stopping threads all the time.
To make sure that (for whatever reason) the number of waiting threads doesn't
get too high, threads exit if there are more than two DNS threads idling around
with nothing to do.
Signed-off-by: Uli Schlachter <psychon@...>