#once #cell #exclusive #static #singleton #synchronization-primitive

no-std exclusive_cell

A thread-safe, non-blocking, no-std cell that can only be accessed once

1 unstable release

0.1.0 Dec 15, 2022

#11 in #exclusive

Download history 1444/week @ 2024-04-06 634/week @ 2024-04-13 789/week @ 2024-04-20 460/week @ 2024-04-27 478/week @ 2024-05-04 835/week @ 2024-05-11 674/week @ 2024-05-18 552/week @ 2024-05-25 835/week @ 2024-06-01 752/week @ 2024-06-08 787/week @ 2024-06-15 489/week @ 2024-06-22 682/week @ 2024-06-29 466/week @ 2024-07-06 735/week @ 2024-07-13 837/week @ 2024-07-20

2,775 downloads per month
Used in 2 crates (via hermit-sync)

MIT/Apache

11KB
84 lines

exclusive_cell

Crates.io docs.rs CI

This crate provides two thread-safe, non-blocking, no-std synchronization primitives:

  • ExclusiveCell can be accessed at most once and provides mutable access to the stored contents.
  • CallOnce can only be called once sucessfully.

For API documentation see the docs.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

No runtime deps