test: add scheduler_concept regression guard for all stdexec schedulers - #2257
Merged
ericniebler merged 2 commits intoSep 16, 2026
Merged
Conversation
Per [exec.sched], scheduler types should define a nested scheduler_concept alias derived from scheduler_tag. PR NVIDIA#2256 (issue NVIDIA#2134) added the missing aliases; this adds compile-time guards so the requirement cannot regress. - New test/exec/test_scheduler_concept.cpp statically asserts the alias and scheduler<> satisfaction for the always-available schedulers: inline, run_loop, task_scheduler, parallel, static_thread_pool, thread_pool_base (CRTP), timed_thread, trampoline, and the internal reschedule scheduler. - Gated schedulers are asserted in their existing gated test files: io_uring, windows_thread_pool, libdispatch, and the nvexec stream and multi-GPU stream schedulers. Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
Contributor
Author
|
Hi @ericniebler — small test-only follow-up to #2256: compile-time guards so the scheduler_concept alias from #2134 can't silently regress. Could you /ok to test when you get a chance? Thanks! |
ericniebler
approved these changes
Sep 15, 2026
…ng-format 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
Contributor
Author
|
Pushed a one-line clang-format fix (0f216e4) — the style check should be green now, but the new workflow run is sitting in "awaiting maintainer approval". Could you approve it when you get a chance? Thanks! |
Collaborator
|
/ok to test 0f216e4 |
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.
Follow-up to #2256.
While working on #2134 I noticed nothing actually stops this from coming back — a
new scheduler can forget the
scheduler_conceptalias and users end up with thesame confusing
no viable overloaded '='error insideexec::taskagain. So thisPR adds a small compile-time guard, test-only, that fails to build if any
scheduler in stdexec drops the alias.
What's here:
test/exec/test_scheduler_concept.cpp(new): statically checks that thealways-built schedulers — inline, run_loop, task_scheduler, parallel,
static_thread_pool, thread_pool_base-derived pools, timed_thread, trampoline,
and reschedule's internal scheduler — define the alias and satisfy
scheduler<>.multi-GPU stream) are asserted in their existing gated test files, so no extra
CMake plumbing is needed on other platforms.
Verification:
test.exec— 3417 assertions / 362 cases pass (Release, Apple Clang 21).Happy to move or restructure this if there's a better home for the guard.