refactor network manager

This commit is contained in:
John Smith
2022-05-31 19:54:52 -04:00
parent ad4b6328ac
commit 8148c37708
51 changed files with 500 additions and 389 deletions
+6 -1
View File
@@ -94,7 +94,12 @@ where
}
pub fn get_concurrency() -> u32 {
num_cpus::get() as u32
std::thread::available_parallelism()
.map(|x| x.get())
.unwrap_or_else(|e| {
warn!("unable to get concurrency defaulting to single core: {}", e);
1
}) as u32
}
pub async fn get_outbound_relay_peer() -> Option<crate::veilid_api::PeerInfo> {