mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Enable breadth-first traversal.
MozReview-Commit-ID: KJA2drcLTb5
This commit is contained in:
parent
09b8f124f5
commit
ce19c949db
1 changed files with 6 additions and 0 deletions
|
@ -80,6 +80,12 @@ lazy_static! {
|
||||||
} else {
|
} else {
|
||||||
let configuration = rayon::Configuration::new()
|
let configuration = rayon::Configuration::new()
|
||||||
.num_threads(num_threads)
|
.num_threads(num_threads)
|
||||||
|
// Enable a breadth-first rayon traversal. This causes the work
|
||||||
|
// queue to be always FIFO, rather than FIFO for stealers and
|
||||||
|
// FILO for the owner (which is what rayon does by default). This
|
||||||
|
// ensures that we process all the elements at a given depth before
|
||||||
|
// proceeding to the next depth, which is important for style sharing.
|
||||||
|
.breadth_first()
|
||||||
.thread_name(thread_name)
|
.thread_name(thread_name)
|
||||||
.start_handler(thread_startup)
|
.start_handler(thread_startup)
|
||||||
.exit_handler(thread_shutdown);
|
.exit_handler(thread_shutdown);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue