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

Don't make submission when not polling in SubmissionQueue::wake #75

Open
Thomasdezeeuw opened this issue Jul 14, 2023 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@Thomasdezeeuw
Copy link
Owner

The current SubmissionQueue::wake implementation always adds an event, even if we're not currently polling. We can try to keep track when we're polling and only then add a submission, otherwise it would be an no-op.

I already have a implementation for this based on Mio's Waker: https://github.com/Thomasdezeeuw/heph/blob/64a3e330dc9f3bdc40a4cb61b004ec17501cf2d8/rt/src/thread_waker.rs.

@Thomasdezeeuw
Copy link
Owner Author

Could also return a boolean indicating whether or not the ring was actually awoken (vs. not polling).

@Thomasdezeeuw
Copy link
Owner Author

Commit f752da0 improves this a little bit.

@Thomasdezeeuw Thomasdezeeuw added the enhancement New feature or request label Jan 14, 2024
@Thomasdezeeuw Thomasdezeeuw changed the title Don't submit needless submission in SubmissionQueue::wake Don't make submission when not polling in SubmissionQueue::wake Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant