https://github.com/sunfishcode/singlethreaded-cell
A `Cell` type that knows that there is only one thread
https://github.com/sunfishcode/singlethreaded-cell
Last synced: 24 days ago
JSON representation
A `Cell` type that knows that there is only one thread
- Host: GitHub
- URL: https://github.com/sunfishcode/singlethreaded-cell
- Owner: sunfishcode
- License: apache-2.0
- Created: 2025-01-14T21:29:05.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-01-14T21:30:18.000Z (4 months ago)
- Last Synced: 2025-04-29T05:49:28.247Z (24 days ago)
- Language: Rust
- Size: 4.88 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[`SinglethreadedCell`] is a cell that only supports single-threaded platforms.
It's similar to [`core::cell::UnsafeCell`], except it implements `Deref` and
`Sync`, which it can do because it never exposes external mutation and only
supports single-threaded platforms.[`SinglethreadedCell`]: https://docs.rs/singlethreaded-cell/*/singlethreaded_cell/struct.SinglethreadedCell.html
[`core::cell::UnsafeCell`]: https://doc.rust-lang.org/stable/core/cell/struct.UnsafeCell.html