feat(runtime): poll-based API for PollFd#944
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a poll-based readiness API for compio-runtime::fd::PollFd, enabling integration with manual poll_* workflows (and futures_util I/O traits) in addition to the existing async *_ready().await methods.
Changes:
- Added
poll_*_readyandpoll_*_withmethods toPollFd, plusfutures_util::AsyncRead/AsyncWriteimpls. - Refactored platform implementations to support polling (
unixstores in-flight submissions;windowsadds shared submission + waker fan-out). - Added
read_buffeature plumbing throughcompio/compio-runtime, and exposed a newWakerArrayRefhelper fromcompio-io.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| compio/Cargo.toml | Extends the workspace read_buf feature to include compio-runtime. |
| compio-runtime/src/lib.rs | Enables nightly read_buf/BorrowedCursor support behind the read_buf feature. |
| compio-runtime/src/fd/poll_fd/windows.rs | Adds poll-based readiness implementation and shared-waker polling path on Windows. |
| compio-runtime/src/fd/poll_fd/unix.rs | Adds poll-based readiness implementation using cached in-flight submissions on Unix. |
| compio-runtime/src/fd/poll_fd/mod.rs | Adds public poll APIs, poll_*_with helpers, and futures_util AsyncRead/AsyncWrite impls. |
| compio-runtime/Cargo.toml | Adds read_buf feature and a Windows-only compio-io dependency for compat utilities. |
| compio-net/tests/poll.rs | Updates tests to exercise the new poll-based helpers and AsyncWrite usage. |
| compio-io/src/compat/waker_array.rs | Documents WakerArrayRef (multi-waker fan-out). |
| compio-io/src/compat/mod.rs | Re-exports the waker-array compat utility. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
|
We should let current async methods to use internal |
Member
Author
|
@George-Miao ping? Do you think this PR is OK to be published under v0.19? |
Member
Sure. LGTM. |
Berrysoft
enabled auto-merge (squash)
June 14, 2026 15:34
George-Miao
approved these changes
Jun 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.