From 745f0a14a3a2fc03991bd9c3d523f14aca97d98e Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Mon, 6 May 2024 12:40:31 -0700 Subject: [PATCH] Clarify the logical view of iterators --- include/VersionedMap.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/VersionedMap.h b/include/VersionedMap.h index 5e9ddf9..8e47f5d 100644 --- a/include/VersionedMap.h +++ b/include/VersionedMap.h @@ -86,10 +86,12 @@ struct VersionedMap { /** The version of the most recent call to `setOldestVersion`. */ int64_t getOldestVersion() const; - /** Fixed to a specific version. It's thread-safe to operate on an iterator - * concurrently with any method of `VersionedMap`, as long as it's not - * invalidated by `setOldestVersion`. @warning must not outlive its - * `VersionedMap`. */ + /** Iterates through a canonicalized view of all the mutations from + * `oldestVersion` to the iterator's version. There may be mutations from + * versions < `oldestVersion`, but they won't affect the result. It's + * thread-safe to operate on an iterator concurrently with any method of + * `VersionedMap`, as long as it's not invalidated by `setOldestVersion`. + * @warning must not outlive its `VersionedMap`. */ struct Iterator { Iterator() = default;