Skip to content

Commit

Permalink
bump required rayon version to 0.7
Browse files Browse the repository at this point in the history
...and bring jpeg-decoder along for the ride.  Minor tweaks were
necessary because of rayon API changes.
  • Loading branch information
froydnj committed May 5, 2017
1 parent 7fc0143 commit 681b578
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 17 deletions.
37 changes: 27 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion components/layout/Cargo.toml
Expand Up @@ -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" }
Expand Down
2 changes: 1 addition & 1 deletion components/layout_thread/Cargo.toml
Expand Up @@ -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"}
Expand Down
2 changes: 1 addition & 1 deletion components/layout_thread/lib.rs
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion components/style/Cargo.toml
Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion components/style/gecko/global_style_data.rs
Expand Up @@ -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
};
Expand Down
2 changes: 1 addition & 1 deletion components/style/scoped_tls.rs
Expand Up @@ -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));
Expand Down
1 change: 1 addition & 0 deletions servo-tidy.toml
Expand Up @@ -20,6 +20,7 @@ rand = [
"parking_lot_core",
"phf_generator",
"rayon",
"rayon-core",
"servo_rand",
"servo-websocket",
"tempdir",
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/style/Cargo.toml
Expand Up @@ -19,7 +19,7 @@ cssparser = "0.13"
euclid = "0.11"
html5ever = "0.16"
parking_lot = "0.3"
rayon = "0.6"
rayon = "0.7"
rustc-serialize = "0.3"
selectors = {path = "../../../components/selectors"}
servo_atoms = {path = "../../../components/atoms"}
Expand Down

0 comments on commit 681b578

Please sign in to comment.