mirror of
https://github.com/servo/servo.git
synced 2025-09-06 04:58:21 +01:00
Bump rayon to 1.0
This commit is contained in:
parent
cccca27f4f
commit
fae2d9839f
8 changed files with 133 additions and 95 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