From a6016c7eeb11fc8aeaa1a3b160b970b15362695d Mon Sep 17 00:00:00 2001 From: hozan23 Date: Sun, 19 May 2024 22:20:03 +0200 Subject: add tokio examples to p2p, jsonrpc, and net crates --- p2p/examples/shared/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'p2p/examples/shared/mod.rs') diff --git a/p2p/examples/shared/mod.rs b/p2p/examples/shared/mod.rs index 57d89ef..0e8079c 100644 --- a/p2p/examples/shared/mod.rs +++ b/p2p/examples/shared/mod.rs @@ -5,7 +5,7 @@ use smol::{channel, future, future::Future, Executor}; /// Returns an estimate of the default amount of parallelism a program should use. /// see `std::thread::available_parallelism` -fn available_parallelism() -> usize { +pub fn available_parallelism() -> usize { thread::available_parallelism() .map(NonZeroUsize::get) .unwrap_or(1) -- cgit v1.2.3