rust/library/std
bors fd1f8aa05d Auto merge of #127912 - joboet:tls_dtor_thread_current, r=cuviper
std: make `thread::current` available in all `thread_local!` destructors

... and thereby allow the panic runtime to always print the right thread name.

This works by modifying the TLS destructor system to schedule a runtime cleanup function after all other TLS destructors registered by `std` have run. Unfortunately, this doesn't affect foreign TLS destructors, `thread::current` will still panic there.

Additionally, the thread ID returned by `current_id` will now always be available, even inside the global allocator, and will not change during the lifetime of one thread (this was previously the case with key-based TLS).

The mechanisms I added for this (`local_pointer` and `thread_cleanup`) will also allow finally fixing #111272 by moving the signal stack to a similar runtime-cleanup TLS variable.
2024-10-03 03:31:47 +00:00
..
benches Reformat use declarations. 2024-07-29 08:26:52 +10:00
src Auto merge of #127912 - joboet:tls_dtor_thread_current, r=cuviper 2024-10-03 03:31:47 +00:00
tests Fix std tests for wasm32-wasip2 target 2024-09-29 04:48:13 +02:00
build.rs Enable f16 tests on non-GNU Windows 2024-09-30 22:41:19 -04:00
Cargo.toml Update hashbrown to 0.15 and adjust some methods 2024-10-02 09:44:51 +02:00