Module async_map::single_writer_versioned [−][src]
Expand description
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 locked on the linked list element, so that no actual locks are required and reads can always
proceed without waiting.
Structs
Quitter | Quits the updated task backing the data structure. Though not necessary (see notes) it allows the the data structure to become invalidated for updates, which may speed up dropping of references to it by acting as a signal to reference holders. |
Versioned | The core structure of this package, which provides synchronous read-access to the latest version and aysnchronous writes, delegated to the update task. |
Traits
DataUpdater |