mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Exit Canvas paint thread on shutdown
This commit is contained in:
parent
b19f9d9c5b
commit
cdf22c1493
3 changed files with 7 additions and 0 deletions
|
@ -66,6 +66,7 @@ impl<'a> CanvasPaintThread <'a> {
|
|||
}
|
||||
}
|
||||
},
|
||||
CanvasMsg::Exit => break,
|
||||
}
|
||||
},
|
||||
Err(e) => {
|
||||
|
|
|
@ -27,6 +27,7 @@ pub enum CanvasMsg {
|
|||
FromScript(FromScriptMsg, CanvasId),
|
||||
Recreate(Size2D<u32>, CanvasId),
|
||||
Close(CanvasId),
|
||||
Exit,
|
||||
}
|
||||
|
||||
#[derive(Clone, Deserialize, Serialize)]
|
||||
|
|
|
@ -1441,6 +1441,11 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
debug!("Exiting Canvas Paint thread.");
|
||||
if let Err(e) = self.canvas_chan.send(CanvasMsg::Exit) {
|
||||
warn!("Exit Canvas Paint thread failed ({})", e);
|
||||
}
|
||||
|
||||
if let Some(webgl_threads) = self.webgl_threads.as_ref() {
|
||||
debug!("Exiting WebGL thread.");
|
||||
if let Err(e) = webgl_threads.exit() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue