Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TrieMap.computeIfAbsent() #219

Merged
merged 1 commit into from
Jan 27, 2025
Merged

Add TrieMap.computeIfAbsent() #219

merged 1 commit into from
Jan 27, 2025

Conversation

rovarga
Copy link
Collaborator

@rovarga rovarga commented Jan 25, 2025

This is another logical operation -- combining lookup with insert. This
patch adds explicit support for it, so it happens in a single pass (most
of the time).

Note that concurrent activity may lead to the value being computed
multiple times.

Nevertheless fixes #147.

Signed-off-by: Robert Varga [email protected]

This is another logical operation -- combining lookup with insert. This
patch adds explicit support for it, so it happens in a single pass (most
of the time).

Note that concurrent activity may lead to the value being computed
multiple times.

Nevertheless fixes PANTHEONtech#147.

Signed-off-by: Robert Varga <[email protected]>
@rovarga rovarga merged commit 1d9e15f into PANTHEONtech:master Jan 27, 2025
2 checks passed
@rovarga rovarga deleted the gh147 branch January 27, 2025 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement MutableTrieMap.computeIfAbsent()
1 participant