Skip to content

Commit

Permalink
Don't spawn layout threads in sequential mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrubeck committed Jun 6, 2017
1 parent 8eecefe commit a158b10
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/layout_thread/lib.rs
Expand Up @@ -439,7 +439,11 @@ impl LayoutThread {

let configuration =
rayon::Configuration::new().num_threads(layout_threads);
let parallel_traversal = rayon::ThreadPool::new(configuration).ok();
let parallel_traversal = if layout_threads > 1 {
Some(rayon::ThreadPool::new(configuration).expect("ThreadPool creation failed"))
} else {
None
};
debug!("Possible layout Threads: {}", layout_threads);

// Create the channel on which new animations can be sent.
Expand Down

0 comments on commit a158b10

Please sign in to comment.