mirror of
https://github.com/servo/servo.git
synced 2025-08-16 19:05:33 +01:00
Auto merge of #20058 - Eijebong:rayon1.0, r=jdm
Bump rayon to 1.0 <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20058) <!-- Reviewable:end -->
This commit is contained in:
commit
b6bd719c5d
17 changed files with 163 additions and 96 deletions
|
@ -85,7 +85,7 @@ lazy_static! {
|
|||
let pool = if num_threads < 1 || unsafe { !bindings::Gecko_ShouldCreateStyleThreadPool() } {
|
||||
None
|
||||
} else {
|
||||
let configuration = rayon::Configuration::new()
|
||||
let workers = rayon::ThreadPoolBuilder::new()
|
||||
.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
|
||||
|
@ -96,9 +96,9 @@ lazy_static! {
|
|||
.thread_name(thread_name)
|
||||
.start_handler(thread_startup)
|
||||
.exit_handler(thread_shutdown)
|
||||
.stack_size(STYLE_THREAD_STACK_SIZE_KB * 1024);
|
||||
let pool = rayon::ThreadPool::new(configuration).ok();
|
||||
pool
|
||||
.stack_size(STYLE_THREAD_STACK_SIZE_KB * 1024)
|
||||
.build();
|
||||
workers.ok()
|
||||
};
|
||||
|
||||
StyleThreadPool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue