Skip to content

mozilla/atomic_refcell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

atomic_refcell

A thread-safe analogue of RefCell for Rust.

Overview

AtomicRefCell provides RefCell-like borrow semantics (checked at runtime, with immutable and mutable borrows) for values shared across threads. It is designed for use cases where the caller can guarantee that mutable and immutable borrows never overlap concurrently, but still requires a Sync type.

The crate is no_std compatible.

Features

Feature Description
portable-atomic Use portable-atomic instead of core::sync::atomic. Enables support for targets without native atomic compare-and-swap instructions (e.g. thumbv6m-none-eabi).
serde Implement Serialize and Deserialize for AtomicRefCell<T>.

Minimum Supported Rust Version (MSRV)

Rust 1.60 or later is required.

About

Threadsafe RefCell for Rust

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE.APACHE
MIT
LICENSE.MIT

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages