mirror of
https://github.com/servo/servo.git
synced 2025-08-29 17:18:23 +01:00
constellation: send EmbedderMsg::ShutdownComplete as last (#38923)
To help ensure our internal threads have shut-down before we deinit Servo, the last thing the constellation should do, is sending the `EmbedderMsg::ShutdownComplete`. Testing: Manual testing by starting Servo and then closing the window. Fixes: Part of https://github.com/servo/servo/issues/30849 --------- Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com> Signed-off-by: Gregory Terzian <2792687+gterzian@users.noreply.github.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
c75995ec87
commit
909ceee830
1 changed files with 6 additions and 3 deletions
|
@ -768,6 +768,12 @@ where
|
||||||
join_handle
|
join_handle
|
||||||
.join()
|
.join()
|
||||||
.expect("Failed to join on the fetch thread in the constellation");
|
.expect("Failed to join on the fetch thread in the constellation");
|
||||||
|
|
||||||
|
// Note: the last thing the constellation does, is asking the embedder to
|
||||||
|
// shut down. This helps ensure we've shut down all our internal threads before
|
||||||
|
// de-initializing Servo (see the `thread_count` warning on MacOS).
|
||||||
|
debug!("Asking embedding layer to complete shutdown.");
|
||||||
|
self.embedder_proxy.send(EmbedderMsg::ShutdownComplete);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Generate a new pipeline id namespace.
|
/// Generate a new pipeline id namespace.
|
||||||
|
@ -2719,9 +2725,6 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
debug!("Asking embedding layer to complete shutdown.");
|
|
||||||
self.embedder_proxy.send(EmbedderMsg::ShutdownComplete);
|
|
||||||
|
|
||||||
debug!("Shutting-down IPC router thread in constellation.");
|
debug!("Shutting-down IPC router thread in constellation.");
|
||||||
ROUTER.shutdown();
|
ROUTER.shutdown();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue