mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Explicitly register rayon threads, rather than assuming that as the default.
MozReview-Commit-ID: E4kUyy8HjmV
This commit is contained in:
parent
531397ff15
commit
90e9bbbadc
3 changed files with 10 additions and 9 deletions
|
@ -461,7 +461,8 @@ impl LayoutThread {
|
|||
ScaleFactor::new(opts::get().device_pixels_per_px.unwrap_or(1.0)));
|
||||
|
||||
let configuration =
|
||||
rayon::Configuration::new().num_threads(layout_threads);
|
||||
rayon::Configuration::new().num_threads(layout_threads)
|
||||
.start_handler(|_| thread_state::initialize_layout_worker_thread());
|
||||
let parallel_traversal = if layout_threads > 1 {
|
||||
Some(rayon::ThreadPool::new(configuration).expect("ThreadPool creation failed"))
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue