Commit 3c6d0f3a authored by Igor Chorążewicz's avatar Igor Chorążewicz
Browse files

radix_tree: allow concurrent iteration

Iterator operator++/--:
 Removing nodes/leaves which are pointed to be iterators might
 result in operator++/operator-- failures (since nodes/leaves are
 detached from the tree find_leaf/next_leaf functions will not
 find a proper entry).

 Fix this by adding a fallback path which just searches from the top
 (using lower_bound/upper_bound).

internal_bound:
 Do not traverse the tree twice. Instead save the path from first
 traversal to a vector and just iterate over the vector. Before
 returning iterator to the user, we can check if the path changed
 (if any node on the path was modified). If so, the operation needs
 to be retried.
parent 8079613c
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment