Skip to content

Conversation

kirkshoop
Copy link
Contributor

merge takes multiple sequence-senders and forwards all the item-senders from each of the input sequences to the same Receiver::set_next

The calls to Receiver::set_next are not synchronized. If each sequence-sender is emitting on a different scheduler in parallel, then the calls to Receiver::set_next will also be in parallel.

merge completes after all the sequence-senders complete.

The other commits were needed to debug the merge implementation.

- add `__debug_sequence_sender`
- add `__well_formed_sequence_sender`
- add static-member-fn support to `get_item_types`
- add static-member-fn support to `subscribe`
- add support for `STDEXEC_ENABLE_EXTRA_TYPE_CHECKING`
- add `__well_formed_sequence_sender` constraint
- add `__mexception` overloads for `get_item_types`
- remove constraints that were causing SFINAE that would skip the debug info
each input sequence may be on a different scheduler.
The merged items will invoke `set_next` on the receiver from all of the contexts.
Depending on the schedulers in play, the calls to `set_next` may overlap in parallel.
Copy link

copy-pr-bot bot commented Sep 30, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Copy link
Collaborator

@ericniebler ericniebler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very cool. only minor stylistic nits. template parameters should always be capitalized, and alias templates should end with _t. otherwise looks great.

Comment on lines +661 to +663
" auto get_item_types(_Env&&...) -> exec::item_types<\n" \
" // This sequence produces void items...\n" \
" stdexec::__call_result_t<stdexec::just_t>,\n" \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this return type is missing a trailing >

@ericniebler
Copy link
Collaborator

/ok to test 4cca273

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants