Skip to content

fix: make poll() and poll_one() check for ready I/O - #419

Closed
TheLingeringWill wants to merge 1 commit into
cppalliance:developfrom
TheLingeringWill:pr/poll-reaps-ready-io
Closed

TheLingeringWill wants to merge 1 commit into
cppalliance:developfrom
TheLingeringWill:pr/poll-reaps-ready-io

Conversation

@TheLingeringWill

@TheLingeringWill TheLingeringWill commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

No description provided.

@coderabbitai

coderabbitai Bot commented Nov 13, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@cppalliance-bot

cppalliance-bot commented Nov 13, 2026 •

Copy link
Copy Markdown

An automated preview of the documentation is available at https://419.corosio.prtest3.cppalliance.org/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-11-14 00:42:52 UTC

@cppalliance-bot

cppalliance-bot commented Nov 13, 2026 •

Copy link
Copy Markdown

GCOVR code coverage report https://419.corosio.prtest3.cppalliance.org/gcovr/index.html
LCOV code coverage report https://419.corosio.prtest3.cppalliance.org/genhtml/index.html
Coverage Diff Report https://419.corosio.prtest3.cppalliance.org/diff-report/index.html

Build time: 2026-11-14 01:00:04 UTC

On the reactor backends, poll() and poll_one() returned as soon as the
reactor's sentinel was the only entry queued, without polling the
reactor. A read whose data had already arrived, or a timer that had
expired, stayed pending however many times poll() ran, unless some
other handler happened to be queued with the sentinel.

The sentinel now makes one non-blocking pass in that case. A pass that
reaps completions runs them as before; poll() and poll_one() return once
a pass reaps nothing.

The pass releases the mutex while this thread holds the sentinel, so a
run() thread can park on the condition variable meanwhile. Returning
after a pass now wakes a parked peer to take the sentinel, as io_uring
does; wait_one() returns the same way and gets the same hand-off.

Closes cppalliance#418
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Beast2 Nov 14, 2026
@TheLingeringWill
TheLingeringWill deleted the pr/poll-reaps-ready-io branch November 14, 2026 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants