lib-misc-utils · crate
once_cell
Kinogaki's own once_cell, published under the crates.io name so the frozen naga, wgpu-core and read-fonts resolve to it through [patch.crates-io].
- Repository
- lib-misc-utils (kinogaki/lib-misc-utils)
- Folder
libs/lib-misc-utils/crates/once_cell- Source
- 1 file, 158 lines
- Tests
- 1 file, 38 lines
What it is
Kinogaki's own once_cell, published under the crates.io name so the frozen naga, wgpu-core and read-fonts resolve to it through [patch.crates-io]. It is not upstream once_cell: it has the three types those crates use, as thin wrappers over std's OnceLock and LazyLock (which grew out of once_cell).
Depends on
None.
Third-party
None.
Used by
None.
Third-party crates using it
Modules
syncThread-safe cells initialised once.117 linesraceUpstream's lock-free cells; here they wait likeOnceLock, which only changes who computes the value when two threads race to initialise it.34 lines
Public types and traits
By module: 3 public types and traits in 2 modules
race OnceBox
sync LazyOnceCell
