servo/components/net
Gregory Terzian 77ff351cde
net: clean shutdown of the async runtime (#38425)
The previous use of a static variable for the runtime prevented it from
shutting down cleanly, because shutdown requires dropping or taking
ownership of it. This PR switches the static variable to a handle only,
and introduces a new trait to pass a handle to the async runtime to the
constellation, where it can be shut-down along with other components and
help reduce our count of still running threads after shutdown.

Testing: manual testing, and covered by unit-test in net, and wpt tests.
Fixes: part of - https://github.com/servo/servo/issues/30849

---------

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
2025-08-04 21:42:47 +00:00
..
fetch Calculate and send the missing transferred_size and content_size to dev tools (#38216) 2025-08-02 02:41:53 +00:00
indexeddb [IndexedDB] Adhere better to the specification for idb object store related operations (#37682) 2025-07-16 02:11:06 +00:00
protocols Initial support for marking custom protocol secure (#36656) 2025-04-25 10:39:33 +00:00
tests net: clean shutdown of the async runtime (#38425) 2025-08-04 21:42:47 +00:00
async_runtime.rs net: clean shutdown of the async runtime (#38425) 2025-08-04 21:42:47 +00:00
Cargo.toml Implement cookie expiry date parsing algorithm (#37715) 2025-07-11 05:18:11 +00:00
connector.rs net: clean shutdown of the async runtime (#38425) 2025-08-04 21:42:47 +00:00
cookie.rs net: Add expiry limit to cookies and prevent panics from max-age (#38376) 2025-07-31 02:52:50 +00:00
cookie_storage.rs Refactor and document cookie-list retrieval (#38070) 2025-07-14 22:15:27 +00:00
decoder.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
filemanager_thread.rs servoshell: Migrate to egui-file-dialog from tinyfiledialogs (#34823) 2025-02-04 18:24:24 +00:00
hosts.rs Replace the lazy_static crate with std::sync::LazyLock in components/net (#33046) 2024-08-14 12:15:55 +00:00
hsts.rs Replace hsts preload list hashmap with an FST (#37015) 2025-05-20 04:26:55 +00:00
http_cache.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
http_loader.rs net: clean shutdown of the async runtime (#38425) 2025-08-04 21:42:47 +00:00
image_cache.rs net: Do not print SVG tree in Debug implementation of VectorImageData (#37846) 2025-07-17 04:15:23 +00:00
lib.rs Initial IndexedDB Support (#33044) 2025-06-19 05:19:07 +00:00
local_directory_listing.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
request_interceptor.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
resource_thread.rs net: clean shutdown of the async runtime (#38425) 2025-08-04 21:42:47 +00:00
storage_thread.rs storage: Isolate sessionStorage per top-level browsing context and copy sessionStorage when creating a new auxiliary browsing context (#37803) 2025-07-04 09:15:12 +00:00
subresource_integrity.rs clippy: Fix warnings in components/net (#31626) 2024-03-13 09:40:04 +00:00
websocket_loader.rs net: clean shutdown of the async runtime (#38425) 2025-08-04 21:42:47 +00:00