rust/library/std
许杰友 Jieyou Xu (Joe) 31b4023e24
Rollup merge of #132730 - joboet:after_main_sync, r=Noratrieb
std: allow after-main use of synchronization primitives

By creating an unnamed thread handle when the actual one has already been destroyed, synchronization primitives using thread parking can be used even outside the Rust runtime.

This also fixes an inefficiency in the queue-based `RwLock`: if `thread::current` was not initialized yet, it will create a new handle on every parking attempt without initializing `thread::current`. The private `current_or_unnamed` function introduced here fixes this.
2024-11-25 00:39:03 +08:00
..
benches Reformat use declarations. 2024-07-29 08:26:52 +10:00
src Rollup merge of #132730 - joboet:after_main_sync, r=Noratrieb 2024-11-25 00:39:03 +08:00
tests Avoid shadowing user provided types or type aliases in thread_local! 2024-10-18 10:27:41 +08:00
build.rs Enable f128 tests on all non-buggy platforms 🎉 2024-11-03 19:33:04 -06:00
Cargo.toml Emscripten: link with -sWASM_BIGINT 2024-11-11 17:25:50 +01:00