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

Questions about get_lt() and key and value requiring Clone #8

Open
nalply opened this issue Sep 9, 2024 · 0 comments
Open

Questions about get_lt() and key and value requiring Clone #8

nalply opened this issue Sep 9, 2024 · 0 comments

Comments

@nalply
Copy link

nalply commented Sep 9, 2024

From the documentation of get_lt():

Atomically get a key and value out of the map that is associated with the key that is lexicographically less than the provided key.

Do you mean that the key one gets with that method could be any key that is less than the provided key?

Or is it the lexicographically highest key less than the provided key?

Edit: I have another question: why do key and value require Clone. I suspect it is because of a conflict of holding a reference to something that might be updated concurrently. Right?

@nalply nalply changed the title Question about get_lt() Question about get_lt() and key and value requiring Clone Sep 12, 2024
@nalply nalply changed the title Question about get_lt() and key and value requiring Clone Questions about get_lt() and key and value requiring Clone Sep 12, 2024
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

No branches or pull requests

1 participant