X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=README.md;fp=README.md;h=195a7475b86566f06df37675f6ebf37dd85de371;hb=624f46ff6ace5dfca5dcfe2606585b3aa68ae28c;hp=5fd67b002860663423052dfd9abdddef99c5abfd;hpb=5521cf3b2a05bf8e883101b8b887e37cf7a5eada;p=junction.git diff --git a/README.md b/README.md index 5fd67b0..195a747 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ -Junction is a library of concurrent data structures in C++. It contains three hash map implementations: +Junction is a library of concurrent data structures in C++. It contains several hash map implementations: + junction::ConcurrentMap_Crude junction::ConcurrentMap_Linear junction::ConcurrentMap_LeapFrog junction::ConcurrentMap_Grampa @@ -98,13 +99,11 @@ The `JUNCTION_USERCONFIG` variable works in a similar way. As an example, take a ## Rules and Behavior -A Junction map is a lot like a big array of `std::atomic<>` variables, where the key is an index into the array, stores use `memory_order_release`, and loads use `memory_order_consume`. +A Junction map is a lot like a big array of `std::atomic<>` variables, where the key is an index into the array. More precisely: -More precisely, the following rules apply to Junction's Linear, LeapFrog and Grampa maps: - -* All of their member functions, together with their `Mutator` member functions, are atomic with respect to each other, so you can safely call them from any thread without mutual exclusion. +* All of a Junction map's member functions, together with its `Mutator` member functions, are atomic with respect to each other, so you can safely call them from any thread without mutual exclusion. * If an `insert` [happens before](http://preshing.com/20130702/the-happens-before-relation/) a `get` with the same key, the `get` will return the value it inserted, except if another operation changes the value in between. Any [synchronizing operation](http://preshing.com/20130823/the-synchronizes-with-relation/) will establish this relationship. -* `insert` is a [release](http://preshing.com/20120913/acquire-and-release-semantics/) operation and `get` is a [consume](http://preshing.com/20140709/the-purpose-of-memory_order_consume-in-cpp11/) operation, so you can safely pass non-atomic information between threads using a pointer. +* For Linear, LeapFrog and Grampa maps, `insert` is a [release](http://preshing.com/20120913/acquire-and-release-semantics/) operation and `get` is a [consume](http://preshing.com/20140709/the-purpose-of-memory_order_consume-in-cpp11/) operation, so you can safely pass non-atomic information between threads using a pointer. For Crude maps, all operations are relaxed. * In the current version, you must not insert while concurrently using an `Iterator`. ## Feedback