Expand description
This crate provides data-structure for concurrent use by many tasks in an asynschronous contexts, with a particular focus on high-read/low-write situations.
Modules§
- non_
locking_ map - single_
writer_ versioned - The
single_writer_versioned
module implements a versioning mechanism for immutable data-structures which allows many concurrent readers. All changes to the contained data structure - which, since they are immtuable, means a creating a new instance - are delegated to a single task, and hence occur sequentially. Each new update is appended to a linked list of versions, and an atomic integer is used to indicate which is the latest version, so readers can retrieve the latest version when they read. This integer acts in place of a lock on the linked list element, so that no actual locks are required and reads can always proceed without waiting.
Structs§
Traits§
- Async
Factory - A trait for factory methods that can be used to create new values for a key in an asynchronous map. A blanket implementation is provided.
- Async
Key - A trait for types that can be keys in an asynchronous map. A blanket implementation is provided.
- Async
Map - Async
Storable - A trait for types that can be held in a collection used in an asynchronous context, which might be shared between many tasks. A blanket implementation is provided.
- Factory
Borrow - A trait for types from which a factory method can be borrowed. A blanket implementation is provided.