The Send impl for `FontContext` is too forgiving.

I'm pretty confident that it is only thread safe if FK is (or another way of putting it is, I'm pretty sure if you include an `Rc<_>` in FK it should not be safe to share between threads).
This commit is contained in:
Joshua Yanovski 2018-03-09 01:20:49 +01:00 committed by GitHub
parent 64c818e530
commit c7064b31ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ pub struct FontContext<FK> where FK: Clone + Hash + Eq + Ord {
}
// Core Text is thread-safe.
unsafe impl<FK> Send for FontContext<FK> where FK: Clone + Hash + Eq + Ord {}
unsafe impl<FK> Send for FontContext<FK> where FK: Clone + Hash + Eq + Ord + Send {}
impl<FK> FontContext<FK> where FK: Clone + Hash + Eq + Ord {
/// Creates a new font context instance.