caolan / caolan/highland

Destroying parent after merge, zipAll, sequence et al

Open
#412 15 comments 0 reactions 0 assignees View on GitHub
3.x
Dominant language
JavaScript
Stars
3.4k
Forks
145
PR merge metrics
No merged PRs in 30d

Description

Starting a sperate issue for this rather than resurrect a closed thread. In #402 we realised that some of the non-`consume` based functions need to be handled differently. The choices we have are:
- Destroy parent as well as all streams it's currently consuming from, but not any stream that it's not yet consumed.
- Destroy parent and all streams it's consuming from regardless.
- Only destroy the parent. This is what happens now.

Option 1 seems to be the least bad approach and it could be supplemented by implementing an equivalent of Rx's [using](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/operators/using.md) operator.

Do we want to make the `using` function one of the prerequisites of the PR that addresses this?

Contributor guide

Open the contributing guide

Research direction

Start by reading #402 and this issue's discussion, then inspect the merge, zipAll, and sequence operations and their current parent-destruction behavior. Determine which consumption cases each operation allows, resolve whether an equivalent of Rx's using is a prerequisite, and define the chosen destruction semantics before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.