mirror of
https://github.com/zhboner/realm.git
synced 2026-11-17 08:15:55 +00:00
dns lazy init. concern about thread-safety
This commit is contained in:
@@ -10,8 +10,12 @@ use resolver::lookup_ip::{LookupIp, LookupIpIter};
|
||||
pub use resolver::config;
|
||||
use config::{ResolverOpts, ResolverConfig};
|
||||
|
||||
#[cfg(not(feature = "multi-thread"))]
|
||||
use once_cell::unsync::{OnceCell, Lazy};
|
||||
|
||||
#[cfg(feature = "multi-thread")]
|
||||
use once_cell::{unsync::OnceCell, sync::Lazy};
|
||||
|
||||
use crate::endpoint::RemoteAddr;
|
||||
|
||||
/// Dns config.
|
||||
|
||||
Reference in New Issue
Block a user