mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
style: Add a comment about a Send bound that may look confusing.
This commit is contained in:
parent
c7add81517
commit
3fcd23dcdf
1 changed files with 3 additions and 0 deletions
|
@ -15,6 +15,9 @@ use std::ops::DerefMut;
|
||||||
///
|
///
|
||||||
/// We use this on Servo to construct thread-local contexts, but clear them once
|
/// We use this on Servo to construct thread-local contexts, but clear them once
|
||||||
/// we're done with restyling.
|
/// 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> {
|
pub struct ScopedTLS<'scope, T: Send> {
|
||||||
pool: &'scope rayon::ThreadPool,
|
pool: &'scope rayon::ThreadPool,
|
||||||
slots: Box<[RefCell<Option<T>>]>,
|
slots: Box<[RefCell<Option<T>>]>,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue