docs.rs failed to build voluntary-servitude-4.0.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
voluntary-servitude-4.0.8
Voluntary Servitude
Features
- Atomic abstractions (
Atomic
,AtomicOption
,FillOnceAtomicOption
,FillOnceAtomicArc
) - Thread-safe appendable list with a lock-free iterator (
VoluntaryServitude
- also calledVS
) - Serde serialization (
serde-traits
feature) par_extend
,from_par_iter
rayon implementation- Logging (
logs
feature)
Atomic abstractions
- Atomic -> atomic
Box<T>
- AtomicOption -> atomic
Option<Box<T>>
- FillOnceAtomicOption -> atomic
Option<Box<T>>
that can give references (ideal for iterators) - FillOnceAtomicArc -> atomic
Option<Arc<T>>
with a limited API (likeFillOnceAtomicOption
)
With Atomic
and AtomicOption
it's not safe to get a reference, you must replace the value to access it.
To safely get a reference to T you must use FillOnceAtomicOption
and accept the API limitations (initially None
but can be filled once).
For a safe AtomicArc
you must use some data-structure from arc-swap
, RwLock/Mutex
from parking_lot
(or std
, which is slower but the standard) or FillOnceAtomicArc
and accept the limited API (2018).
Licenses
MIT and Apache-2.0
VoluntaryServitude
Examples
Single thread
extern crate voluntary_servitude;
Multi-producer, multi-consumer
extern crate voluntary_servitude;
use ;
const CONSUMERS: usize = 8;
const PRODUCERS: usize = 4;
const ELEMENTS: usize = 10_000_000;