Auto merge of #16303 - froydnj:rayon-version-bump, r=jdm

bump required rayon version to 0.7

...and bring jpeg-decoder along for the ride.  Minor tweaks were necessary because of rayon API changes.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- 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/16303)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-05-08 21:36:48 -05:00 committed by GitHub
commit fc3a7d03f2
10 changed files with 37 additions and 19 deletions

View file

@ -30,7 +30,7 @@ ordered-float = "0.4"
parking_lot = "0.3.3"
profile_traits = {path = "../profile_traits"}
range = {path = "../range"}
rayon = "0.6"
rayon = "0.7"
script_layout_interface = {path = "../script_layout_interface"}
script_traits = {path = "../script_traits"}
selectors = { path = "../selectors" }

View file

@ -25,7 +25,7 @@ msg = {path = "../msg"}
net_traits = {path = "../net_traits"}
parking_lot = {version = "0.3.3", features = ["nightly"]}
profile_traits = {path = "../profile_traits"}
rayon = "0.6"
rayon = "0.7"
script = {path = "../script"}
script_layout_interface = {path = "../script_layout_interface"}
script_traits = {path = "../script_traits"}

View file

@ -398,7 +398,7 @@ impl LayoutThread {
opts::get().initial_window_size.to_f32() * ScaleFactor::new(1.0));
let configuration =
rayon::Configuration::new().set_num_threads(layout_threads);
rayon::Configuration::new().num_threads(layout_threads);
let parallel_traversal = rayon::ThreadPool::new(configuration).ok();
debug!("Possible layout Threads: {}", layout_threads);

View file

@ -47,7 +47,7 @@ ordered-float = "0.4"
parking_lot = "0.3.3"
pdqsort = "0.1.0"
precomputed-hash = "0.1"
rayon = "0.6"
rayon = "0.7"
selectors = { path = "../selectors" }
serde = {version = "0.9", optional = true}
serde_derive = {version = "0.9", optional = true}

View file

@ -40,7 +40,7 @@ lazy_static! {
None
} else {
let configuration =
rayon::Configuration::new().set_num_threads(num_threads);
rayon::Configuration::new().num_threads(num_threads);
let pool = rayon::ThreadPool::new(configuration).ok();
pool
};

View file

@ -27,7 +27,7 @@ impl<'scope, T: Send> ScopedTLS<'scope, T> {
/// Create a new scoped TLS that will last as long as this rayon threadpool
/// reference.
pub fn new(p: &'scope rayon::ThreadPool) -> Self {
let count = p.num_threads();
let count = p.current_num_threads();
let mut v = Vec::with_capacity(count);
for _ in 0..count {
v.push(RefCell::new(None));