diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2019-09-02 11:55:28 +0200 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2019-09-12 22:34:16 +0200 |
commit | 3fcd23dcdf0c8f8e32a1ae0b0eafd7640f63b10b (patch) | |
tree | 54c4ac8e44db2dafea398b3d5364e7e6df95cb77 /components/style/scoped_tls.rs | |
parent | c7add815174831975ebfec3d65536c8ea5e1d9ed (diff) | |
download | servo-3fcd23dcdf0c8f8e32a1ae0b0eafd7640f63b10b.tar.gz servo-3fcd23dcdf0c8f8e32a1ae0b0eafd7640f63b10b.zip |
style: Add a comment about a Send bound that may look confusing.
Diffstat (limited to 'components/style/scoped_tls.rs')
-rw-r--r-- | components/style/scoped_tls.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/components/style/scoped_tls.rs b/components/style/scoped_tls.rs index b4eed7509c9..e1e5209a058 100644 --- a/components/style/scoped_tls.rs +++ b/components/style/scoped_tls.rs @@ -15,6 +15,9 @@ use std::ops::DerefMut; /// /// 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>>]>, |