make_future: isolate __loop_ private-member access in single detail helper#7247
Open
guptapratykshh wants to merge 3 commits intoTheHPXProject:masterfrom
Open
make_future: isolate __loop_ private-member access in single detail helper#7247guptapratykshh wants to merge 3 commits intoTheHPXProject:masterfrom
guptapratykshh wants to merge 3 commits intoTheHPXProject:masterfrom
Conversation
…elper Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
Up to standards ✅🟢 Issues
|
Collaborator
|
Can one of the admins verify this patch? |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors make_future’s run loop integration by isolating the internal stdexec::run_loop recovery logic (via the scheduler environment’s .__loop_ member) into a single helper, reducing the spread of reliance on that internal detail.
Changes:
- Added a
detail::get_run_loop_from_schedulerhelper that centralizes access to the scheduler environment’s.__loop_member. - Updated
future_data_with_run_loopconstruction to use the new helper instead of inlining the.__loop_access.
Comment on lines
+44
to
+50
| template <typename Scheduler> | ||
| constexpr hpx::execution::experimental::run_loop& | ||
| get_run_loop_from_scheduler(Scheduler const& sched) noexcept | ||
| { | ||
| return static_cast<hpx::execution::experimental::run_loop&>( | ||
| *hpx::execution::experimental::get_env(schedule(sched)) | ||
| .__loop_); |
Comment on lines
+42
to
+43
| // See https://github.com/STEllAR-GROUP/hpx for context on this | ||
| // post-cleanup follow-up of #7123. |
Comment on lines
+32
to
+33
| // Recover the parent `run_loop&` from a `run_loop::scheduler`. | ||
| // |
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
…O is not constexpr (fixes GCC strict mode CI failure)
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.
post-cleanup follow-up to #7123
Proposed Changes
Any background context you want to provide?
Checklist
Not all points below apply to all pull requests.