Module elsa::sync

source ·
Expand description

This module is experimental

This module provides threadsafe versions of FrozenMap and FrozenVec, ideal for use as a cache.

These lock internally, however locks only last as long as the method calls

Structs

  • Append-only threadsafe version of std::collections::BTreeMap where insertion does not require mutable access
  • Append-only threadsafe version of std::collections::HashMap where insertion does not require mutable access
  • Append-only threadsafe version of std::vec::Vec where insertion does not require mutable access
  • Iterator over FrozenVec, obtained via .iter()
  • Append-only threadsafe version of std::vec::Vec where insertion does not require mutable access. Does not lock for reading, only allows Copy types and will spinlock on pushes without affecting reads. Note that this data structure is 64 pointers large on 64 bit systems, in contrast to Vec which is 3 pointers large.