Skip to content

Add constraints to IoAwaitable - #383

Open
akrzemi1 wants to merge 2 commits into
cppalliance:developfrom
akrzemi1:ioawaitable
Open

Add constraints to IoAwaitable#383
akrzemi1 wants to merge 2 commits into
cppalliance:developfrom
akrzemi1:ioawaitable

Conversation

@akrzemi1

Copy link
Copy Markdown
Contributor

This add constraints to IoAwaitabe, so that the concept reflects what is needed for a type to be used in Capy-coroutines:

  • await_ready,
  • await_resume,
  • move construction.

This add constraints to IoAwaitabe, so that the concept reflects
what is needed for a type to be used in Capy-coroutines:

 * `await_ready`,
 * `await_resume`,
 * move construction.
@akrzemi1

Copy link
Copy Markdown
Contributor Author

This addresses #356.

@cppalliance-bot

cppalliance-bot commented Aug 23, 2026

Copy link
Copy Markdown

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

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

2026-08-23 23:43:19 UTC

@cppalliance-bot

cppalliance-bot commented Aug 23, 2026

Copy link
Copy Markdown

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

Build time: 2026-08-23 23:56:36 UTC

@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.09%. Comparing base (59296c7) to head (9b957fd).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #383   +/-   ##
========================================
  Coverage    98.09%   98.09%           
========================================
  Files          130      130           
  Lines         6291     6291           
========================================
  Hits          6171     6171           
  Misses         120      120           
Flag Coverage Δ
linux 98.08% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
include/boost/capy/task.hpp 100.00% <ø> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 59296c7...9b957fd. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vinniefalco

Copy link
Copy Markdown
Member

Typo in "funciton"

Should it be convertible to bool instead of same_as<bool>?

The return value excludes typed handles (e.g. std::coroutine_handle<U>). We might want a note or something.

The Doxygen comment example drops the old semantic-requirements list about stop tokens and frame allocator propagation. Consider restoring this guidance in some form.

@akrzemi1

Copy link
Copy Markdown
Contributor Author

Typo in "funciton"

Fixed.

Should it be convertible to bool instead of same_as<bool>?

C++ awaiters are not allowed to return "convertible to bool". IoAwaitable shouldn't try to be smarter.

The return value excludes typed handles (e.g. std::coroutine_handle<U>). We might want a note or something.

My bad. I changed the concept to allow this.

The Doxygen comment example drops the old semantic-requirements list about stop tokens and frame allocator propagation. Consider restoring this guidance in some form.

They seem not to apply to the awaitable, but rather to the bodies of the resumed coroutines. Maybe instead, I will mention this in a (new) chapter which explains how to define your own coroutine?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

3 participants