Added dns_threads setter to sync ClientBuilder (#381)

This commit is contained in:
David Wilemski
2018-11-05 11:27:32 -08:00
committed by Sean McArthur
parent 527bcecce6
commit 6ef2060510

View File

@@ -262,6 +262,13 @@ impl ClientBuilder {
self self
} }
/// Set the number of threads to use for DNS
///
/// Default is 4
pub fn dns_threads(self, threads: usize) -> ClientBuilder {
self.with_inner(|inner| inner.dns_threads(threads))
}
fn with_inner<F>(mut self, func: F) -> ClientBuilder fn with_inner<F>(mut self, func: F) -> ClientBuilder
where where
F: FnOnce(async_impl::ClientBuilder) -> async_impl::ClientBuilder, F: FnOnce(async_impl::ClientBuilder) -> async_impl::ClientBuilder,