mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Do not disable thread pool in the parent process.
This commit is contained in:
parent
26d2e77410
commit
20ec610e68
2 changed files with 1 additions and 5 deletions
|
@ -1684,9 +1684,6 @@ extern "C" {
|
||||||
extern "C" {
|
extern "C" {
|
||||||
pub fn Gecko_RegisterNamespace(ns: *mut nsAtom) -> i32;
|
pub fn Gecko_RegisterNamespace(ns: *mut nsAtom) -> i32;
|
||||||
}
|
}
|
||||||
extern "C" {
|
|
||||||
pub fn Gecko_ShouldCreateStyleThreadPool() -> bool;
|
|
||||||
}
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
pub fn Gecko_Construct_Default_nsStyleFont(
|
pub fn Gecko_Construct_Default_nsStyleFont(
|
||||||
ptr: *mut nsStyleFont,
|
ptr: *mut nsStyleFont,
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
//! Global style data
|
//! Global style data
|
||||||
|
|
||||||
use context::StyleSystemOptions;
|
use context::StyleSystemOptions;
|
||||||
use gecko_bindings::bindings;
|
|
||||||
use gecko_bindings::bindings::{Gecko_RegisterProfilerThread, Gecko_UnregisterProfilerThread};
|
use gecko_bindings::bindings::{Gecko_RegisterProfilerThread, Gecko_UnregisterProfilerThread};
|
||||||
use gecko_bindings::bindings::Gecko_SetJemallocThreadLocalArena;
|
use gecko_bindings::bindings::Gecko_SetJemallocThreadLocalArena;
|
||||||
use num_cpus;
|
use num_cpus;
|
||||||
|
@ -82,7 +81,7 @@ lazy_static! {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let pool = if num_threads < 1 || unsafe { !bindings::Gecko_ShouldCreateStyleThreadPool() } {
|
let pool = if num_threads < 1 {
|
||||||
None
|
None
|
||||||
} else {
|
} else {
|
||||||
let workers = rayon::ThreadPoolBuilder::new()
|
let workers = rayon::ThreadPoolBuilder::new()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue