mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Terminate timer scheduler thread during shutdown
This commit is contained in:
parent
6a795f4795
commit
fb878f33d1
8 changed files with 47 additions and 23 deletions
|
@ -96,7 +96,7 @@ use profile_traits::time;
|
|||
use script_traits::{AnimationState, AnimationTickType, CompositorEvent};
|
||||
use script_traits::{ConstellationControlMsg, ConstellationMsg as FromCompositorMsg, DiscardBrowsingContext};
|
||||
use script_traits::{DocumentActivity, DocumentState, LayoutControlMsg, LoadData};
|
||||
use script_traits::{IFrameLoadInfo, IFrameLoadInfoWithData, IFrameSandboxState, TimerEventRequest};
|
||||
use script_traits::{IFrameLoadInfo, IFrameLoadInfoWithData, IFrameSandboxState, TimerSchedulerMsg};
|
||||
use script_traits::{LayoutMsg as FromLayoutMsg, ScriptMsg as FromScriptMsg, ScriptThreadFactory};
|
||||
use script_traits::{LogEntry, ServiceWorkerMsg, webdriver_msg};
|
||||
use script_traits::{MozBrowserErrorType, MozBrowserEvent, WebDriverCommandMsg, WindowSizeData};
|
||||
|
@ -214,7 +214,7 @@ pub struct Constellation<Message, LTF, STF> {
|
|||
|
||||
/// A channel for the constellation to send messages to the
|
||||
/// timer thread.
|
||||
scheduler_chan: IpcSender<TimerEventRequest>,
|
||||
scheduler_chan: IpcSender<TimerSchedulerMsg>,
|
||||
|
||||
/// A channel for the constellation to send messages to the
|
||||
/// Webrender thread.
|
||||
|
@ -1241,6 +1241,11 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
|
|||
}
|
||||
}
|
||||
|
||||
debug!("Exiting timer scheduler.");
|
||||
if let Err(e) = self.scheduler_chan.send(TimerSchedulerMsg::Exit) {
|
||||
warn!("Exit timer scheduler failed ({})", e);
|
||||
}
|
||||
|
||||
debug!("Exiting font cache thread.");
|
||||
self.font_cache_thread.exit();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue