Skip to content

Latest commit

 

History

History
43 lines (29 loc) · 1.73 KB

README.md

File metadata and controls

43 lines (29 loc) · 1.73 KB

ArcSwap

Travis Build Status AppVeyor Build status

The Rust's Arc can be used from multiple threads and the count is safely updated as needed. However, the Arc itself can't be atomically replaced. To do that, one needs to place it under a lock.

On the other hand, AtomicPtr can be replaced atomically, but it's hard to know when the target can be safely freed.

This is a cross-breed between the two ‒ an ArcSwap can be seeded with an Arc and the Arc can be simultaneously replaced and read by multiple threads.

Read the documentation before using.

Rust version policy

There's no hard policy yet. However, currently the crate builds with Rust 1.26 and is tested for that. There would have to be a very good reason to increase the required version.

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.