author | Emilio Cobos Álvarez <emilio@crisal.io> |
Mon, 02 Sep 2019 11:55:28 +0200 | |
changeset 491140 | f7433877d2a19f144ca57c3d403a8c22f2897a0d |
parent 491139 | 931619f1fe4bd430eb96d911fba70a38341d5646 |
child 491141 | 40a4283011552fe2b69a0ad3d53c538a06552bf7 |
push id | 36522 |
push user | dluca@mozilla.com |
push date | Mon, 02 Sep 2019 21:36:35 +0000 |
treeherder | mozilla-central@0fe8d7dd713d [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
milestone | 70.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/servo/components/style/scoped_tls.rs +++ b/servo/components/style/scoped_tls.rs @@ -10,16 +10,19 @@ use rayon; use std::cell::{Ref, RefCell, RefMut}; use std::ops::DerefMut; /// A scoped TLS set, that is alive during the `'scope` lifetime. /// /// We use this on Servo to construct thread-local contexts, but clear them once /// we're done with restyling. +/// +/// Note that the cleanup is done on the thread that owns the scoped TLS, thus +/// the Send bound. pub struct ScopedTLS<'scope, T: Send> { pool: &'scope rayon::ThreadPool, slots: Box<[RefCell<Option<T>>]>, } /// The scoped TLS is `Sync` because no more than one worker thread can access a /// given slot. unsafe impl<'scope, T: Send> Sync for ScopedTLS<'scope, T> {}