-
Notifications
You must be signed in to change notification settings - Fork 95
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
First draft of generic concurrency algorithm #73
Conversation
Note to self: I also got an email pointing out that it's probably not okay for us to alias a |
I feel that "publish" could possibly be a more descriptive name for (Hello from YouTube by the way lol) |
"flush" seems like it might be okay too |
Yeah, |
Just wanted to say that this is awesome, and a similar idea to what I had in mind in my follow-up proposal in #48, just far more elegant. Excited for this one, thank you! 💜 |
This partially addresses #74. There is still a violation in implementing `ShallowCopy` for `Box`, but that one we'll tackle separately.
Fixes #75.
It makes the code so much nicer. A nod to #76 is also worthwhile here.
We are constantly removing items from the beginning of it and pushing things onto the end, which causes a lot of reallocations for a `Vec`, but not for a `VecDeque`. Fixes #79.
I finally got a chance to take a proper look at this! Tomorrow I'm going to see about implementing maps with different value storages with it and seeing what else comes up, but one thing I can see immediately: I think I haven't tried any of this out, but just to throw out some ideas for this: Other than that, this all seems awesome and I'll report back after having given it a proper try! Edit to add: Alternatively, if the goal is truly to keep |
@MayaWolf That's exciting — I look forward to seeing what you come up with (though it may take me a little while to get back to you — apologies in advance). As far as I'll also note that I don't think |
@MayaWolf Actually, it looks like |
@jonhoo Awesome, I'll look into this! For now, I've implemented basic versions of both a single-value map, and a map using a hashset as the value storage, and There are, however, two things about the public API I find curious/questionable:
|
@MayaWolf Hopefully the change in #83 that gets rid of Out of curiosity, what use do you have for a map that has a As for your API questions:
|
@MayaWolf I'll add to ^ that if you come across any part of the |
@jonhoo I'm working with at-least-once delivery guarantees and a multitude of unique has-many relationships - so for something like member lists, a HashSet is just easiest to work with. To be clear, this would be entirely possible with what evmap provides out of the box, but HashSet allows me to add values without having to check whether they already exist first, and is probably a little more efficient than evmap's general-purpose value bag. While I get the arguments of passing This is more of a question because I may very well be missing something - but does calling As for So far, the docs seemed on point and very easy to understand - but that's admittedly coming from someone already quite familiar with the internals of |
@MayaWolf Ah, yes, that makes sense! Neat to see that this already makes sense in more contexts :D So, I think that Hehe, no, you're right, it doesn't. What it does buy you is the ability to get at a Hmm, I'm conflicted about adding |
Implements #45 (comment).
Fixes #45 and #70 by allowing separate implementations of the data structure that re-use the concurrency primitive.
Fixes #67 by making
ReadGuard::map
public./cc @jeff-hiner, @comath, @mattdm -- you've all expressed interest in having a single-map version in the past.
This change is