boostorg / unordered

Boost.org unordered module
http://boost.org/libs/unordered
Boost Software License 1.0
62 stars 55 forks source link

Element locking in `boost::concurrent_flat_set::*visit` operations #260

Closed joaquintides closed 1 month ago

joaquintides commented 2 months ago

As keys in a set are treated as const, boost::concurrent_flat_set::visit(f) (and all *_or_visit operations) are const member functions and behave exactly as their cvisit counterparts:

In some cases, though, we may want to have const, exclusive-locked access, such as for instance if the element has a mutable data member we'd like to modify. This could be in principle served by a non-const overloads of boost::concurrent_flat_set::visit(f) and other operations implying visitation.

joaquintides commented 1 month ago

Addressed in #265.