mirror of
https://github.com/servo/servo.git
synced 2025-08-14 18:05:36 +01:00
bump required rayon version to 0.7
...and bring jpeg-decoder along for the ride. Minor tweaks were necessary because of rayon API changes.
This commit is contained in:
parent
7fc01437f4
commit
681b578326
9 changed files with 35 additions and 17 deletions
|
@ -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}
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue