run_loop: advertise sync_wait_domain via get_completion_domain on env_t#7276
Merged
hkaiser merged 2 commits intoMay 19, 2026
Conversation
Up to standards ✅🟢 Issues
|
5de7399 to
acc4e28
Compare
Collaborator
|
Can one of the admins verify this patch? |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR completes run_loop::env_t’s completion-domain query so that stdexec::sync_wait on senders completing on run_loop_scheduler resolves to HPX’s cooperative detail::sync_wait_domain instead of default_domain’s OS-blocking wait.
Changes:
- Add
run_loop::env_t::query(get_completion_domain_t<CPO>) -> detail::sync_wait_domaindeclaration (templated to defer instantiation). - Provide the out-of-class definition of that query in
detail/sync_wait_domain.hppaftersync_wait_domainis fully defined. - Remove the previously commented-out
get_completion_domainoverload stubs and replace them with a note pointing to the deferred definition.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| libs/core/execution/include/hpx/execution/algorithms/run_loop.hpp | Declares a templated get_completion_domain query on run_loop::env_t to advertise HPX’s sync_wait_domain. |
| libs/core/execution/include/hpx/execution/algorithms/detail/sync_wait_domain.hpp | Defines the deferred run_loop::env_t::query(get_completion_domain_t<CPO>) after sync_wait_domain is complete. |
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
acc4e28 to
a9fd843
Compare
6eb0f3c to
9004b8d
Compare
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
9004b8d to
c45f038
Compare
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.
Proposed Changes
query(get_completion_domain_t<CPO>)overload onrun_loop::env_tso thatstdexec::sync_waiton a sender whose set_value completion scheduler isrun_loop_schedulerresolves the completion domain to HPX'sdetail::sync_wait_domain(cooperative HPX-synchronization wait) instead of falling through todefault_domain(OS-blocking wait).-> detail::sync_wait_domaininsideenv_t, and define the body indetail/sync_wait_domain.hppaftersync_wait_domainis complete -- same deferred-definition pattern already used bysync_wait_rcv_env::queryin the same file. Avoids the circular include betweenrun_loop.hppandsync_wait_domain.hpp.run_loop_schedulerinherits the query via the existingusing env_t::query;, so the resolution pathsender env -> get_completion_scheduler<set_value_t> -> scheduler -> get_completion_domain<set_value_t>reachessync_wait_domainwithout a separate scheduler-level overload.Any background context you want to provide?
Checklist
Not all points below apply to all pull requests.