Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

Commit 4572774

Browse files
committed
radix_tree: warn about using reverse iterator in concurrent env
1 parent 055f8da commit 4572774

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

include/libpmemobj++/experimental/radix_tree.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2694,6 +2694,8 @@ radix_tree<Key, Value, BytesView, MtMode>::end() const
26942694
/**
26952695
* Returns a reverse iterator to the beginning.
26962696
*
2697+
* Using reverse iterators in concurrent environment is not safe.
2698+
*
26972699
* @return reverse_iterator pointing to the last element in the vector.
26982700
*/
26992701
template <typename Key, typename Value, typename BytesView, bool MtMode>
@@ -2706,6 +2708,8 @@ radix_tree<Key, Value, BytesView, MtMode>::rbegin()
27062708
/**
27072709
* Returns a reverse iterator to the end.
27082710
*
2711+
* Using reverse iterators in concurrent environment is not safe.
2712+
*
27092713
* @return reverse_iterator pointing to the theoretical element preceding the
27102714
* first element in the vector.
27112715
*/
@@ -2719,6 +2723,8 @@ radix_tree<Key, Value, BytesView, MtMode>::rend()
27192723
/**
27202724
* Returns a const, reverse iterator to the beginning.
27212725
*
2726+
* Using reverse iterators in concurrent environment is not safe.
2727+
*
27222728
* @return const_reverse_iterator pointing to the last element in the vector.
27232729
*/
27242730
template <typename Key, typename Value, typename BytesView, bool MtMode>
@@ -2731,6 +2737,8 @@ radix_tree<Key, Value, BytesView, MtMode>::crbegin() const
27312737
/**
27322738
* Returns a const, reverse iterator to the end.
27332739
*
2740+
* Using reverse iterators in concurrent environment is not safe.
2741+
*
27342742
* @return const_reverse_iterator pointing to the theoretical element preceding
27352743
* the first element in the vector.
27362744
*/

0 commit comments

Comments
 (0)