layout: Shut down style thread-pool when exiting a content process / shutting down the Constellation (#38924)

To ensure a clean-shutdown of Servo, we need to shutdown our internal
threading before deinit. This shuts down the style thread pool either
using the constellation(in single-process mode), or when a content
process exits.

Testing: Manual testing by opening a window, opening and closing
multiple tabs, and closing the window, with a sleep added before deinit
and a sample taken to ensure the loose threads previously noticed are
gone.
Fixes: part of https://github.com/servo/servo/issues/30849

---------

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
This commit is contained in:
Gregory Terzian 2025-08-26 21:10:03 +08:00 committed by GitHub
parent 7339e2b421
commit 08b9eb818c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 10 additions and 0 deletions

1
Cargo.lock generated
View file

@ -1514,6 +1514,7 @@ dependencies = [
"servo_config",
"servo_rand",
"servo_url",
"stylo",
"stylo_traits",
"tracing",
"webgpu",