[][src]Module concread::hashmap

HashMap - A concurrently readable HashMap

This is a specialisation of the BptreeMap, allowing a concurrently readable HashMap. Unlike a traditional hashmap it does not have O(1) lookup, as it internally uses a tree-like structure to store a series of buckets. However if you do not need key-ordering, due to the storage of the hashes as u64 the operations in the tree to seek the bucket is much faster than the use of the same key in the BptreeMap.

For more details. see the BptreeMap

This structure is very different to the im crate. The im crate is sync + send over individual operations. This means that multiple writes can be interleaved atomicly and safely, and the readers always see the latest data. While this is potentially useful to a set of problems, transactional structures are suited to problems where readers have to maintain consistent data views for a duration of time, cpu cache friendly behaviours and database like transaction properties (ACID).

Re-exports

pub use self::map::HashMap;
pub use self::map::HashMapReadSnapshot;
pub use self::map::HashMapReadTxn;
pub use self::map::HashMapWriteTxn;

Modules

iter

Iterators for the map.

map

See the documentation for HashMap module.