execution: Add scheduler-aware overload to as_sender() for P2300 pipe…#7272
execution: Add scheduler-aware overload to as_sender() for P2300 pipe…#7272shivansh023023 wants to merge 2 commits into
Conversation
Up to standards ✅🟢 Issues
|
|
Can one of the admins verify this patch? |
|
@hkaiser |
hkaiser
left a comment
There was a problem hiding this comment.
Besides fixing the reported formatting issues, could you please add tests that scrutinize the new functionalities?
199e764 to
7bcc187
Compare
…lines Signed-off-by: Shivansh Singh <singhshivansh023@gmail.com>
7bcc187 to
7ec40e0
Compare
- Replace enable_if_t with C++20 requires clause in constructor - Deduplicate as_sender_sender_with_scheduler specializations into primary template - Use requires(is_future_v<Future>) to cover both hpx::future and hpx::shared_future Signed-off-by: Shivansh <singhshivansh023@gmail.com> Signed-off-by: Shivansh Singh <singhshivansh023@gmail.com>
7ec40e0 to
b530f78
Compare
|
unit tests added covering Basic construction with scheduler context, Environment querying (get_env, get_completion_scheduler), Full P2300 pipeline integration (schedule | then | sync_wait), shared_future variant (both lvalue and move semantics), void-returning futures, Error propagation through exception channel. |
Unfortunately your new test fails running. |
| // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
|
|
||
| #include <hpx/execution.hpp> | ||
| #include <hpx/executors/thread_pool_scheduler.hpp> |
There was a problem hiding this comment.
This will break C++20 module compilation. Please use generated module headers only:
| #include <hpx/executors/thread_pool_scheduler.hpp> | |
| #include <hpx/modules/executors.hpp> |
execution: Add scheduler-aware overload to as_sender()
Extends the
as_sender()algorithm to accept an optional scheduler parameter,allowing HPX futures to be adapted into P2300 senders with full scheduler context.
Proposed Changes
as_sender_sender_with_scheduler<Future, Scheduler>templateenvstruct followingthread_pool_scheduler::senderpatternhpx::future<T>andhpx::shared_future<T>operator()onas_sender_twith C++20requiresconstraintget_completion_scheduler<set_value_t>()Enables Pipelines Like
Context
thread_pool_scheduler::sender::envpattern exactlyninja hpx_executionpassesChecklist