23 releases

0.4.3 Sep 21, 2019
0.4.0-pre.1 Jul 14, 2019
0.3.8 Mar 27, 2019
0.3.7 Dec 26, 2018
0.3.0 Jul 23, 2018

#15 in Data structures

Download history 32350/week @ 2019-07-10 33326/week @ 2019-07-17 39026/week @ 2019-07-24 43092/week @ 2019-07-31 53141/week @ 2019-08-07 52109/week @ 2019-08-14 48203/week @ 2019-08-21 45975/week @ 2019-08-28 51068/week @ 2019-09-04 52065/week @ 2019-09-11 58032/week @ 2019-09-18 64488/week @ 2019-09-25 63737/week @ 2019-10-02 64922/week @ 2019-10-09 68345/week @ 2019-10-16

185,677 downloads per month
Used in 596 crates (15 directly)


1.5K SLoC


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.


Licensed under either of

at your option.


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