Crates.io | atomic64 |
lib.rs | atomic64 |
version | 0.1.1 |
source | src |
created_at | 2016-04-11 11:35:21.221331 |
updated_at | 2016-04-11 11:54:29.063875 |
description | Atomic 64-bits types |
homepage | https://github.com/obourgain/rust-atomic64 |
repository | https://github.com/obourgain/rust-atomic64 |
max_upload_size | |
id | 4727 |
size | 21,084 |
atomic64
is on Crates.io.
To use atomic64
, first add this to your Cargo.toml
:
[dependencies]
atomic64 = "0.1.0"
Then, add this to your crate root:
extern crate atomic64;
You can now use AtomicI64 and AtomicU64.
## Note
Due to the use of const fn
to allow the creation of AtomicI64::new
and AtomicU64::new
in constant context, atomic64 is only usable on nightly rust. Maybe conditional compilation could solve the issue ?
Includes code derived from Syncbox.
## Internals
On 64-bits platforms, atomic64 will internally use Rust's AtomicIsize and AtomicUsize.
On 32-bits platforms, atomic64 will use an i64 or u64 wrapped by a Mutex. The performance will be wildly different between 32 and 64 bits platforms, with 64 bits expected to be faster.