From 3fcd23dcdf0c8f8e32a1ae0b0eafd7640f63b10b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 2 Sep 2019 11:55:28 +0200 Subject: [PATCH] style: Add a comment about a Send bound that may look confusing. --- components/style/scoped_tls.rs | 3 +++ 1 file changed, 3 insertions(+) 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>]>,