aboutsummaryrefslogtreecommitdiff
path: root/p2p/examples/shared
diff options
context:
space:
mode:
Diffstat (limited to 'p2p/examples/shared')
-rw-r--r--p2p/examples/shared/mod.rs2
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)