|
From: Vaivaswatha N <vai...@gm...> - 2013-03-06 10:59:03
|
Hi, I'm trying to use the SkipListMap provided by libcds. My goal is to be able to update a value atomically when the key is already present. (I'm trying to implement a sparse bit vector on top of the SkipListMap and hence will need to atomically set bits) When inserting a key/value paper, if the key is already present, the SkipListMap interface "insert()" will call a user-provided functor if the item is already present. However, the signature of the functor is such that it doesn't allow me to pass any other external data. So I'm restricted to update the value atomically by only knowing the current value (without any other input). On the other hand, if I use LazyKVList or MichaelKVList, I can do this by calling "ensure()" which will return an iterator. I can use the iterator to atomically update my value. I'm interested to know if there is anyway to update values atomically when the key is present (for SkipListMap). By the way, is there a plan to implement a gc::nogc version of SkipLists (no delete support is ok) ? Can I use the current one without garbage collection and not doing any deletes? Thanks a lot, -- - Vaivaswatha |