aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/thread_state.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <ecoal95@gmail.com>2016-10-07 12:22:06 +0200
committerEmilio Cobos Álvarez <ecoal95@gmail.com>2016-11-14 21:24:19 +0100
commit73917cce83d2225b51b29c374d861d71ec69435f (patch)
treeac8c6b562ca3e88a7d853ddcab88d114362559e7 /components/style/thread_state.rs
parentb7eb36fa84e6c6c77727ea2cd02c57f6750dc7af (diff)
downloadservo-73917cce83d2225b51b29c374d861d71ec69435f.tar.gz
servo-73917cce83d2225b51b29c374d861d71ec69435f.zip
style: Use rayon instead of our custom work queue.
Diffstat (limited to 'components/style/thread_state.rs')
-rw-r--r--components/style/thread_state.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/style/thread_state.rs b/components/style/thread_state.rs
index 12e52425f55..b0fbd5f4294 100644
--- a/components/style/thread_state.rs
+++ b/components/style/thread_state.rs
@@ -72,7 +72,8 @@ mod imp {
pub fn get() -> ThreadState {
let state = STATE.with(|ref k| {
match *k.borrow() {
- None => panic!("Thread state not initialized"),
+ // This is one of the layout threads, that use rayon.
+ None => super::LAYOUT | super::IN_WORKER,
Some(s) => s,
}
});