* Remove `AsyncIterator: Sendable` requirement from merge
# Motivation
Currently a lot of the operator implementations in here that consume other `AsyncSequence`s require the `AsyncIterator` to be `Sendable`. This is mostly due to the fact that we are calling `makeAsyncIterator` on the upstream `AsyncSequence` and then pass that iterator around to various newly spawned `Task`s. This has two downsides:
1. It only allows users to use operators like `merge` if their `AsyncSequence.AsyncIterator` is `Sendable`
2. In merge we are creating new `Task`s for every new demand. Creating `Task`s is not cheap.
My main goal of this PR was to remove the `Sendable` constraint from `merge`.
# Modification
This PR overhauls the complete inner workings of the `AsyncMerge2Sequence`. It does a couple of things:
1. The main change is that instead of creating new `Task`s for every demand, we are creating one `Task` when the `AsyncIterator` is created. This task has as child task for every upstream sequence.
2. When calling `next` we are signalling the child tasks to demand from the upstream
3. A new state machine that is synchronizing the various concurrent operations that can happen
4. Handling cancellation since we are creating a bunch of continuations.
# Result
In the end, this PR swaps the implementation of `AsyncMerge2Sequence` and drops the `Sendable` constraint and passes all tests. Furthermore, on my local performance testing I saw up 50% speed increase in throughput.
# Open points
1. I need to make this sequence re-throwing but before going down that rabbit whole I wanna get buy-in on the implementation.
2. We should discuss and document if `merge` and other operators are hot or cold, i.e. if they only request if they got downstream demand
3. I need to switch `AsyncMerge3Sequence` over to the same iplementation
* Split logic into multiple files, adapt merge3 and incorporate PR feedback
* Add more tests and fix upstream throw behaviour
* Remove internal class from the sequence
* Setup task after first next
* Remove unnecessary tests
* Implement source location information for pairwise block builders
* Enable better source locations for latest validation diagrams
* Use the new naming for partial builders
* Ensure pairwise builder expressions preserve source locations
* Add a detailed proposal like guide for MarbleDiagram
* Slight spacing change
Co-authored-by: kperryua <kperry@apple.com>
* Fix some pluralization agreement
Co-authored-by: kperryua <kperry@apple.com>
* Clarify the testing of merge and add a future direction for unordered groups
* rename the diagram system to a more general 'validate' based name
* Spelling fixes
* Grammar fixes for credits
Co-authored-by: kperryua <kperry@apple.com>
* Split the marble diagram code out into their own files for easier refactoring
* Update latest landing InstantProtocol definition stub
* Migrate to a per Task based queue system to avoid blocking valid future jobs
* Factor inputs to be specialized waits for side tracking
* Add grouping support
* Add tests for grouping and parse failures
* Fixup misstep in package definition for clock stub imports for the marable diagrams
* Add descriptions for partial iterations for debugging aides
* Simplify Task.select implementation to handle continuations more encapsulatedly
* Add descriptions for WorkQueue items for debugging and use stable work queue drains
* Rework marble diagrams to account for task execution
* Add marble diagram tests to validate failure paths
* Test for space no-op in marable diagram DSL
* Factor out parsing into events and generalize
* First draft at marble diagram based tests
* Correct indefinite marble runs, support grouping, and properly handle any number of inputs (by the result builder construction)
* enhance isolation of diagrams with fileprivate
* Add a validator testing support mechanism
* Move the remaining support items into the test support directory
* Add rudimentary tests to validate the validator