mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Auto merge of #14048 - antrik:nosync-ipc_sender, r=mbrubeck
layout/context: Wrap `image_cache_thread` in a `Mutex<>` as well `SharedLayoutContext.image_cache_thread` didn't get the `Mutex<>` treatment along with all the other channels in there, because `ipc-channel::Sender` is presently inherently `Sync`. I believe this to be an implementation accident though, that should be rectified in the future -- not something users should actually rely on... Note that sharing senders (be it `mpsc` or `ipc-channel`) in is probably not a good idea anyway: just cloning them -- and letting them handle the sharing internally -- should be both simpler and cheaper. But right now that's how things are handled here; so let's go with the flow... <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14048) <!-- Reviewable:end -->
This commit is contained in:
commit
7b80386047
2 changed files with 9 additions and 6 deletions
|
@ -511,7 +511,7 @@ impl LayoutThread {
|
|||
local_context_creation_data: Mutex::new(local_style_context_creation_data),
|
||||
timer: self.timer.clone(),
|
||||
},
|
||||
image_cache_thread: self.image_cache_thread.clone(),
|
||||
image_cache_thread: Mutex::new(self.image_cache_thread.clone()),
|
||||
image_cache_sender: Mutex::new(self.image_cache_sender.clone()),
|
||||
font_cache_thread: Mutex::new(self.font_cache_thread.clone()),
|
||||
webrender_image_cache: self.webrender_image_cache.clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue