Open Thomasdezeeuw opened 1 year ago
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.
SubmissionQueue::wake
I already have a implementation for this based on Mio's Waker: https://github.com/Thomasdezeeuw/heph/blob/64a3e330dc9f3bdc40a4cb61b004ec17501cf2d8/rt/src/thread_waker.rs.
Waker
Could also return a boolean indicating whether or not the ring was actually awoken (vs. not polling).
Commit f752da0 improves this a little bit.
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.