Skip to content

Commit

Permalink
multicore: Code simplification
Browse files Browse the repository at this point in the history
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
  • Loading branch information
str4d and daira committed Jun 4, 2021
1 parent 22caab9 commit a4b4e14
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/multicore.rs
Expand Up @@ -45,12 +45,7 @@ mod implementation {
R: Send + 'static,
{
let (sender, receiver) = bounded(1);

let thread_index = if THREAD_POOL.current_thread_index().is_some() {
THREAD_POOL.current_thread_index().unwrap()
} else {
0
};
let thread_index = THREAD_POOL.current_thread_index().unwrap_or(0);

// We keep track here of how many times spawn has been called.
// It can be called without limit, each time, putting a
Expand Down

0 comments on commit a4b4e14

Please sign in to comment.