Bump rayon to 1.0

This commit is contained in:
Bastien Orivel 2018-02-16 02:58:54 +01:00
parent cccca27f4f
commit fae2d9839f
8 changed files with 133 additions and 95 deletions

View file

@ -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 {