mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-01 13:34:38 +00:00
Use a more efficient `Once` on platforms without threads The current implementation uses an atomic queue and spins rather than panicking when calling `call_once` recursively. Since concurrency is not supported on platforms like WASM, `Once` can be implemented much more efficiently using just a single non-atomic state variable.