deleting operations it is no guarantee that you iterate all item in the set.
Moreover, a crash is possible when you try to iterate the next element that has been deleted by concurrent thread.
- @warning Use this iterator on the concurrent container for debugging purpose only.
+ @warning Use this iterator on the concurrent container for debugging purpose only.
*/
typedef michael_set::details::iterator< bucket_type, false > iterator;
//@endcond
public:
+ ///@name Forward iterators (only for debugging purpose)
+ //@{
/// Forward iterator
/**
The forward iterator for Michael's set is based on \p OrderedList forward iterator and has some features:
- it has no post-increment operator
- it iterates items in unordered fashion
+
+ @warning Use this iterator on the concurrent container for debugging purpose only.
*/
typedef michael_set::details::iterator< bucket_type, false > iterator;
}
/// Returns a forward const iterator addressing the first element in a set
- //@{
const_iterator begin() const
{
return cbegin();
}
+
+ /// Returns a forward const iterator addressing the first element in a set
const_iterator cbegin() const
{
return const_iterator( m_Buckets[0].cbegin(), m_Buckets, m_Buckets + bucket_count() );
}
- //@}
/// Returns an const iterator that addresses the location succeeding the last element in a set
- //@{
const_iterator end() const
{
return cend();
}
+
+ /// Returns an const iterator that addresses the location succeeding the last element in a set
const_iterator cend() const
{
return const_iterator( m_Buckets[bucket_count() - 1].cend(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count() );
}
- //@}
+ //@}
public:
/// Initialize hash set
Depends on \p bucket_type you should or should not lock RCU before calling of this function:
- for the set based on \ref cds_intrusive_MichaelList_rcu "MichaelList" RCU should not be locked
- for the set based on \ref cds_intrusive_LazyList_rcu "LazyList" RCU should be locked
+
See ordered list implementation for details.
\code