feat(client): add names to DNS threads
This commit is contained in:
@@ -3,7 +3,7 @@ use std::net::{SocketAddr, ToSocketAddrs};
|
|||||||
use std::vec;
|
use std::vec;
|
||||||
|
|
||||||
use ::futures::{Future, Poll};
|
use ::futures::{Future, Poll};
|
||||||
use ::futures_cpupool::{CpuPool, CpuFuture};
|
use ::futures_cpupool::{CpuPool, CpuFuture, Builder};
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct Dns {
|
pub struct Dns {
|
||||||
@@ -13,7 +13,10 @@ pub struct Dns {
|
|||||||
impl Dns {
|
impl Dns {
|
||||||
pub fn new(threads: usize) -> Dns {
|
pub fn new(threads: usize) -> Dns {
|
||||||
Dns {
|
Dns {
|
||||||
pool: CpuPool::new(threads)
|
pool: Builder::new()
|
||||||
|
.name_prefix("hyper-dns")
|
||||||
|
.pool_size(threads)
|
||||||
|
.create()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user