# once_cell::race - Rust
API documentation for the Rust `race` mod in crate `once_cell`.
Keywords: rust, rustlang, rust-lang, race

# [−] [src] Module once_cell::race

"First one wins" flavor of `OnceCell`.

If two threads race to initialize a type from the `race` module, they don't block, execute initialization function together, but only one of them stores the result.

This module does not require `std` feature.

## Structs

OnceBool | A thread-safe cell which can be written to only once.
OnceBox | A thread-safe cell which can be written to only once.
OnceNonZeroUsize | A thread-safe cell which can be written to only once.