Skip to content

Make waking more robust#262

Merged
Thomasdezeeuw merged 3 commits intomainfrom
robust-waking
Feb 13, 2026
Merged

Make waking more robust#262
Thomasdezeeuw merged 3 commits intomainfrom
robust-waking

Conversation

@Thomasdezeeuw
Copy link
Owner

This adds a new type, PollingState, that replaces the old is polling boolean.

The old boolean was inherently racy because of the timing when the boolean was set, the waker checked the value and the actual polling began.

PollingState keep tracks of previous calls to wake and lets the polling thread know if it's been awoken before the call to poll. If this is the case we'll only poll with a zero timeout to ensure it's quick to return, but it will submit all submissions and process any already ready completions.

This type will provide more robust waking of a Ring::polling thread
instead of the is_polling boolean we're currently using.
@Thomasdezeeuw Thomasdezeeuw merged commit 085fc02 into main Feb 13, 2026
11 of 21 checks passed
@Thomasdezeeuw Thomasdezeeuw deleted the robust-waking branch February 13, 2026 17:11
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

Successfully merging this pull request may close these issues.

1 participant