-
Notifications
You must be signed in to change notification settings - Fork 35
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
Use a single Arc shared between Wakers in WakerArray and WakerVec #118
base: main
Are you sure you want to change the base?
Conversation
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.
Thanks so much for this PR! - I'm trying to better understand everything that's going on, so this first round of reviews is mostly focused on documentation and clarifying what's going on in the unsafe blocks. I've mentioned this in the review comments as well: but the intent of this crate is to upstream parts of it to the stdlib, which means we need to build it with that in mind. I hope that makes sense; thanks!
@yoshuawuyts thanks for the review! I added more documentation/comments, renamed things so that they (hopefully) make more sense, and simplified the code quite a bit[1]. Please take a look! [1] if BY_REF {
std::mem::forget(arc);
} and wake::<A, false>,
wake::<A, true>, weirdness. Previously I was using |
…rect_position safer
5099224
to
6466c29
Compare
@yoshuawuyts @matheus-consoli is there still interest in this change? I think reducing the number of allocations from N to 1 is very beneficial. |
This PR is dependent on #117
after = this PR
before = #117
Also: made dummy waker easier to use and allocation-free.