-
Notifications
You must be signed in to change notification settings - Fork 71
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 once_map package #1665
base: spr/main/3ba8d8f0
Are you sure you want to change the base?
Add once_map package #1665
Conversation
a4d0ee0
to
3fc352c
Compare
31cbe81
to
33a0dad
Compare
aa612cb
to
c117830
Compare
commit-id:293590d9
d2c9ab4
to
d500c74
Compare
c117830
to
a1502d4
Compare
/// | ||
/// Note that this always clones the value out of the underlying map. Because | ||
/// of this, it's common to wrap the `V` in an `Arc<V>` to make cloning cheap. | ||
pub struct OnceMap<K, V, H = RandomState> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is basically dataloader, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see OnceMap
tests in the original repo, but it seems that some bugs appeared there not that long ago (astral-sh/uv#3987). I am not saying that it's unstable or anything, but i think it would be nice to have some tests for it in the future.
Stack: