Skip to content

Commit

Permalink
Conditionally disable multicore on 32 bit processor
Browse files Browse the repository at this point in the history
  • Loading branch information
ankur2136 committed Dec 21, 2023
1 parent c7f8867 commit 87c9c61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/multicore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ pub use maybe_rayon::{
join, scope, Scope,
};

#[cfg(feature = "multicore")]
#[cfg(all(feature = "multicore", target_pointer_width = "64"))]
pub use maybe_rayon::{
current_num_threads,
iter::{IndexedParallelIterator, IntoParallelRefIterator},
slice::ParallelSliceMut,
};

#[cfg(not(feature = "multicore"))]
#[cfg(any(not(feature = "multicore"), target_pointer_width = "32"))]
pub fn current_num_threads() -> usize {
1
}

0 comments on commit 87c9c61

Please sign in to comment.