Repository navigation
fix(exec): probe timed scheduler fallback through the const-lvalue scheduler - #2368
Merged
ericniebler merged 2 commits intoOct 31, 2026
Merged
Conversation
ericniebler
reviewed
Oct 31, 2026
| // claim is computed from the overload the deferred call resolves to. | ||
| using __native_sender_t = __call_result_t<__schedule_at_base_t, | ||
| __sched_t const &, | ||
| time_point_of_t<_Scheduler> const &>; |
Collaborator
There was a problem hiding this comment.
should this be:
Suggested change
| time_point_of_t<_Scheduler> const &>; | |
| time_point_of_t<_Scheduler>>; |
Contributor
Author
There was a problem hiding this comment.
Yes, the deferred call passes the time point as a prvalue, so the probe should too. Fixed in b33355f.
| // deferred lambda captures, not the call site's value category. | ||
| using __native_sender_t = __call_result_t<__schedule_after_base_t, | ||
| __sched_t const &, | ||
| duration_of_t<_Scheduler> const &>; |
ericniebler
approved these changes
Oct 31, 2026
Collaborator
|
/ok to test 1fe9b2b |
…heduler The schedule_after/schedule_at fallbacks deduced the native sender type through the value category of the call site, while the deferred invocation in the fallback's (non-mutable) let_value lambda resolves it through a const S&. For schedulers whose overloads differ by ref-qualification, the completion-scheduler claim was computed from an overload that never runs. Probe through const __decay_t<_Scheduler>& so the claim matches the actual invocation, and evaluate the fallback's noexcept condition the same way. Regression test covers prvalue and lvalue call sites. Refs NVIDIA#2165.
ericniebler
force-pushed
the
fix/timed-fallback-probe-const
branch
from
October 31, 2026 18:18
1fe9b2b to
d9d5818
Compare
Collaborator
|
/ok to test d9d5818 |
The deferred schedule_at/schedule_after calls pass the time point or duration as a prvalue, so probe the native sender type the same way.
Collaborator
|
/ok to test b33355f |
Collaborator
|
thanks! |
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.
Refs #2165.
The
schedule_after/schedule_atfallbacks compute the native sender type from the value category of the call site, while the deferred invocation in the fallback'slet_valuelambda resolves it through aconst S&(the lambda captures the scheduler by copy and is not mutable). For a scheduler whose const-lvalue and non-const-lvalueschedule_atoverloads return different senders, the completion-scheduler claim restored in #2164 was computed from an overload that never runs.The change probes with
const __decay_t<_Scheduler>&, so the claim and the fallback'snoexceptcondition match the overload the deferred call resolves to. The new regression test uses a scheduler with ref-qualifiedschedule_atmembers: both pins fail before the change, both hold after it, and the advertised completion scheduler is the one that actually completes. Test also pins the same behavior for an lvalue call site.Verified with Apple clang 21,
-std=c++20, normal andSTDEXEC_ENABLE_EXTRA_TYPE_CHECKING=ONbuilds:test.stdexec641 cases / 50119 assertions (50120 in the ETC config),test.exec427 cases / 18385 assertions, all green;clang-format-21 --dry-run -Werrorclean on touched files.