-
Notifications
You must be signed in to change notification settings - Fork 206
Add merge each sender adaptor #1664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kirkshoop
wants to merge
11
commits into
NVIDIA:main
Choose a base branch
from
kirkshoop:add-merge_each
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+3,014
−221
Conversation
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
- 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`
…nd `get_item_types`
- 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.
…hecking in connect
merge_each is a sequence adaptor that takes a sequence of nested sequences and merges all the nested values from all the nested sequences into a single output sequence. the first error encountered will trigger a stop request for all active operations. The error is stored and is emitted only after all the active operations have completed. If the error was emitted from an item, a new item is emitted at the end to deliver the stored error. any nested sequence or nested value that completes with set_stopped will not cause any other operations to be stopped. This allows individual nested sequences to be stopped without breaking the merge of the remaining sequences.
|
/ok to test 3f1ba21 |
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.
This is a seminal event.
flat_map(aka map-merge or transform-merge)can be composed from
transform_eachandmerge_each.flat_mapis the root of all async sequence algorithms.In other libraries merge has the problem of unbounded allocations.
This
merge_eachdoes zero allocations.This
merge_eachalso supports bulk processing in a more natural form.each value can be running in parallel on different execution contexts.
A future fork adaptor would take a sequence and fork portions of the
sequence into separate sequences on separate schedulers. Then a
merge_eachwould gather all the result values into a new sequence.Adding a
continue_each_onaftermerge_eachusing a strand schedulerwould remove all the parallel completions by queueing the result values and
emitting them one at a time.
merge_eachis a sequence adaptor that takes a sequence of nestedsequences and merges all the nested values from all the nested
sequences into a single output sequence.
the first error encountered will trigger a stop request for all
active operations. The error is stored and is emitted only after
all the active operations have completed.
If the error was emitted from an item, a new item is emitted
at the end to deliver the stored error.
any nested sequence or nested value that completes with
set_stoppedwill not cause any other operations to be stopped.This allows individual nested sequences to be stopped without
breaking the merge of the remaining sequences.