/*
This file is a part of libcds - Concurrent Data Structures library
- (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+ (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2017
Source code repo: http://github.com/khizmax/libcds/
Download: http://sourceforge.net/projects/libcds/files/
-
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef CDSLIB_INTRUSIVE_FELDMAN_HASHSET_RCU_H
using exempt_ptr = cds::urcu::exempt_ptr< gc, value_type, value_type, disposer, void >; ///< pointer to extracted node
+ /// The size of hash_type in bytes, see \p feldman_hashset::traits::hash_size for explanation
+ static CDS_CONSTEXPR size_t const c_hash_size = base_class::c_hash_size;
+
//@cond
typedef feldman_hashset::level_statistics level_statistics;
//@endcond
- If hash value is not found and \p bInsert is \p false then the set is unchanged,
the function returns <tt> std::pair<false, false> </tt>
- Returns <tt> std::pair<bool, bool> </tt> where \p first is \p true if operation is successfull
+ Returns <tt> std::pair<bool, bool> </tt> where \p first is \p true if operation is successful
(i.e. the item has been inserted or updated),
\p second is \p true if new item has been added or \p false if the set contains that hash.
/** @anchor cds_intrusive_FeldmanHashSet_rcu_iterators
The set supports thread-safe iterators: you may iterate over the set in multi-threaded environment
under explicit RCU lock.
- RCU lock requirement means that inserting or searching is allowed but you must not erase the items from the set
- because erasing under RCU lock can lead to a deadlock. However, another thread can call \p erase() safely
- while your thread is iterating.
+
+ RCU lock requirement means that inserting or searching is allowed for iterating thread
+ but you must not erase the items from the set because erasing under RCU lock can lead
+ to a deadlock. However, another thread can call \p erase() safely while your thread is iterating.
A typical example is:
\code