Skip to content

feat(runtime)!: waker-based future combinator - #825

Merged
George-Miao merged 4 commits into
compio-rs:masterfrom
George-Miao:feat/runtime/waker-combinator
Apr 2, 2026
Merged

George-Miao merged 4 commits into
compio-rs:masterfrom
George-Miao:feat/runtime/waker-combinator

Conversation

@George-Miao

@George-Miao George-Miao commented Apr 2, 2026 •

Copy link
Copy Markdown
Member

BREAKING: Removed future-combinator feature, ECANCELED are returned as-is.

Copilot AI review requested due to automatic review settings April 2, 2026 00:09
@George-Miao George-Miao self-assigned this Apr 2, 2026
@George-Miao George-Miao added enhancement New feature or request package: runtime Related to compio-runtime labels Apr 2, 2026
@George-Miao
George-Miao force-pushed the feat/runtime/waker-combinator branch from 6968f36 to 7ab9096 Compare April 2, 2026 00:09
@George-Miao George-Miao changed the title feat(runtime): waker-based future combinator feat(runtime)!: waker-based future combinator Apr 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to make the runtime’s future combinators waker-based (instead of relying on Context extensions / nightly-only APIs), and removes the future-combinator feature gating so combinators are always available.

Changes:

  • Removes the future-combinator feature from compio and compio-runtime and enables combinator modules unconditionally.
  • Refactors combinators (with_cancel, with_personality) to propagate data via a custom waker path (with_ext / ExtWaker).
  • Moves/removes the old OptWaker module wiring (intended to live under a new waker module).

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
compio/Cargo.toml Removes the future-combinator feature and its inclusion in nightly.
compio-runtime/Cargo.toml Removes future-combinator feature and simplifies nightly feature list.
compio-runtime/src/lib.rs Switches from opt_waker module to waker module and updates re-exports/docs.
compio-runtime/src/opt_waker.rs Deletes the previous OptWaker implementation file.
compio-runtime/src/future/mod.rs Makes future::combinator always compiled and re-exported.
compio-runtime/src/future/future.rs Changes how cancel/extra are extracted (via waker extension instead of context extensions).
compio-runtime/src/future/combinator/mod.rs Updates combinator extension storage (Ext) and adds/updates combinator docs.
compio-runtime/src/future/combinator/cancel.rs Reworks with_cancel polling to use the new waker-based extension mechanism.
compio-runtime/src/future/combinator/personality.rs Reworks with_personality polling to use the new waker-based extension mechanism.
compio-runtime/src/cancel.rs Updates docs and removes feature-gated behavior from CancelToken::current().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread compio-runtime/src/lib.rs Resolved
Comment thread compio-runtime/src/cancel.rs Resolved
@George-Miao
George-Miao force-pushed the feat/runtime/waker-combinator branch 11 times, most recently from f65b16a to 8344f23 Compare April 2, 2026 02:27
@George-Miao

Copy link
Copy Markdown
Member Author

To properly test for cancel result, I changed all ETIMEOUT back to ECANCELED and add an extension trait for io::{Error,Result} and BufResult to check for status.

@George-Miao
George-Miao force-pushed the feat/runtime/waker-combinator branch 3 times, most recently from fc4950d to 9ef9748 Compare April 2, 2026 02:49
@George-Miao
George-Miao requested review from Berrysoft April 2, 2026 02:57
@George-Miao
George-Miao enabled auto-merge April 2, 2026 03:04
@George-Miao George-Miao mentioned this pull request Apr 2, 2026
4 of 5 tasks
Comment thread compio/tests/runtime.rs Resolved
Comment thread compio/Cargo.toml Resolved

@Berrysoft Berrysoft left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK to test for IOCP later, but should remove socket2.

@George-Miao
George-Miao force-pushed the feat/runtime/waker-combinator branch from 9ef9748 to f538506 Compare April 2, 2026 16:36
@George-Miao
George-Miao requested a review from Berrysoft April 2, 2026 16:37
@George-Miao
George-Miao force-pushed the feat/runtime/waker-combinator branch from f538506 to d2d13c8 Compare April 2, 2026 16:38
Comment thread compio-runtime/src/waker/ext.rs Resolved
@George-Miao
George-Miao requested a review from Berrysoft April 2, 2026 17:18

@Berrysoft Berrysoft left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@George-Miao
George-Miao added this pull request to the merge queue Apr 2, 2026
Merged via the queue into compio-rs:master with commit 2215672 Apr 2, 2026
66 checks passed
@github-actions github-actions Bot mentioned this pull request Apr 2, 2026
This was referenced Apr 21, 2026
@github-actions github-actions Bot mentioned this pull request Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change enhancement New feature or request package: runtime Related to compio-runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants