mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Don't spawn layout threads in sequential mode
This commit is contained in:
parent
8eecefe4c8
commit
a158b106f4
1 changed files with 5 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue