diff options
author | hozan23 <hozan23@karyontech.net> | 2024-05-19 22:20:03 +0200 |
---|---|---|
committer | hozan23 <hozan23@karyontech.net> | 2024-05-19 22:20:03 +0200 |
commit | a6016c7eeb11fc8aeaa1a3b160b970b15362695d (patch) | |
tree | a872c02076836811257b59ce7d88f9ef5a85f5ed /p2p/examples/shared | |
parent | 1c520b20f70ddbdab885ec6c4bf5c87893a26eb4 (diff) |
add tokio examples to p2p, jsonrpc, and net crates
Diffstat (limited to 'p2p/examples/shared')
-rw-r--r-- | p2p/examples/shared/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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) |