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

CloneCounter: Unnecessary wakes #345

Open
divergentdave opened this issue Jul 10, 2023 · 1 comment
Open

CloneCounter: Unnecessary wakes #345

divergentdave opened this issue Jul 10, 2023 · 1 comment

Comments

@divergentdave
Copy link
Contributor

I noticed that CloneCounter::decrement() unconditionally notifies all wakers in the WakerSet. If CloneCounterFuture.target were eliminated, (it is always zero) then the decrement() method could instead only notify when previously is equal to one, and save some unneeded wakes.

@jbr
Copy link
Contributor

jbr commented Aug 22, 2023

I haven't addressed this because I need to convince myself that this is thread safe and that with seqcst /some/ thread will always see the specific value in order to ensure waking happened

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

2 participants