X-Git-Url: http://plrg.eecs.uci.edu/git/?p=junction.git;a=blobdiff_plain;f=README.md;h=0a3bbadf6d70799b1d2a3843fa908281ca1ac1f4;hp=b4361a0d931b6abce227b452b7a1270c8fbc12d3;hb=0883d5c0da403f554391e10deef84d42da42c630;hpb=ebd740423cce85a1d1049f637d4e65b7d8465717 diff --git a/README.md b/README.md index b4361a0..0a3bbad 100644 --- a/README.md +++ b/README.md @@ -99,12 +99,12 @@ 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. More precisely: +Currently, Junction maps only work with integer or pointer-sized keys. The hash function must be invertible, so that every key has a unique hash. Otherwise, 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: * 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 `set` [happens before](http://preshing.com/20130702/the-happens-before-relation/) a `get` with the same key, the `get` will return the value set, except if another operation changes the value in between. Any [synchronizing operation](http://preshing.com/20130823/the-synchronizes-with-relation/) will establish this relationship. -* For Linear, Leapfrog and Grampa maps, `set` 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 set while concurrently using an `Iterator`. +* If an `assign` [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. +* For Linear, Leapfrog and Grampa maps, `assign` 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 `assign` while concurrently using an `Iterator`. ## Feedback