-
-
Notifications
You must be signed in to change notification settings - Fork 537
Open
Labels
category: senders/receiversImplementations of the p0443r14 / p2300 + p1897 proposalsImplementations of the p0443r14 / p2300 + p1897 proposalstype: defect
Description
Problem
When split replays a cached result on the fast path (predecessor_done == true), it calls set_value inline on the thread that calls add_continuation(). This ignores the receiver’s completion scheduler returned by get_completion_scheduler<set_value_t>(get_env(receiver)).
There is a TODO in split.hpp#L349 around the fast-path that mentions preserving the scheduler, but the current implementation does not propagate it.
Observed behavior from a demo file
shlokjain@Shloks-MacBook-Pro-2 hpx % /Users/shlokjain/hpx/split_fastpath_scheduler_violation_demo
=== split fast-path scheduler mismatch (HPX split only) ===
Predecessor completed on thread 0x1eecea0c0 with value=42
UI scheduler thread id : 0x16d3cb000
Main thread id : 0x1eecea0c0
Connecting split sender from MAIN thread to a receiver that expects the UI scheduler...
set_value called with value=42
expected scheduler(UI) thread id: 0x16d3cb000
actual completion thread id : 0x1eecea0c0
match? NO
Demo finished.
Reproduce
Minimal standalone demo
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
category: senders/receiversImplementations of the p0443r14 / p2300 + p1897 proposalsImplementations of the p0443r14 / p2300 + p1897 proposalstype: defect