Skip to content

Commit

Permalink
shutting down IPC router thread when a process shuts down.
Browse files Browse the repository at this point in the history
  • Loading branch information
gterzian committed Mar 30, 2020
1 parent 67b4336 commit 53497fe
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions components/constellation/constellation.rs
Expand Up @@ -2833,6 +2833,9 @@ where
debug!("Asking compositor to complete shutdown.");
self.compositor_proxy
.send(ToCompositorMsg::ShutdownComplete);

debug!("Shutting-down IPC router thread in constellation.");
ROUTER.shutdown();
}

fn handle_pipeline_exited(&mut self, pipeline_id: PipelineId) {
Expand Down
7 changes: 7 additions & 0 deletions components/script/script_thread.rs
Expand Up @@ -145,6 +145,7 @@ use script_traits::{ScriptToConstellationChan, TimerSchedulerMsg};
use script_traits::{TouchEventType, TouchId, UntrustedNodeAddress, WheelDelta};
use script_traits::{UpdatePipelineIdReason, WebrenderIpcSender, WindowSizeData, WindowSizeType};
use servo_atoms::Atom;
use servo_config::opts;
use servo_url::{ImmutableOrigin, MutableOrigin, ServoUrl};
use std::borrow::Cow;
use std::cell::Cell;
Expand Down Expand Up @@ -2908,6 +2909,12 @@ impl ScriptThread {
.as_ref()
.map(|bhm| bhm.unregister());

// If we're in multiprocess mode, shut-down the IPC router for this process.
if opts::multiprocess() {
debug!("Exiting IPC router thread in script thread.");
ROUTER.shutdown();
}

debug!("Exited script thread.");
}

Expand Down

0 comments on commit 53497fe

Please sign in to comment.