Conversation
When you have the case of a parent A that is running, and also that parent has a forked child `B` that becomes halted. A, because it is still yielding should continue running. If on the other hand, `A` is waiting, then it should be completed because that was the last blocking child. ``` A - B ``` Howewer, we only checked that the parent did not have blocking children, and not that it was also just waiting (and not running). This adds the check to the `join()` method to ensure that running parents continue running even when a child is halted.
When debugging an effection application, we noticed that in the case
where you had halted children, they were not being removed from
parents that were still running. That meant that you have a fork tree
looking like:
```
Fork {
state: waiting
operation: main
children:
Fork {
state: running
operation:
children:
}
Fork {
state: running
operation:
children:
Fork {
state: halted
operation: setupConnection
children:
}
}
}
```
Which means that if the the parent is long running, then you can
accrue lots of halted children which is a memory leak.
This makes sure that _every_ time that a child joins its parent, it is
removed from the list of children. This is safe because join _only_
happens on finalization of a child.
Member
|
A preview package of this pull request has been released to NPM with the tag $ npm install effection@always-cleanup-childrenor by updating your package.json to: {
"effection": "always-cleanup-children"
}Once the branch associated with this tag is deleted (usually once the PR is merged or closed), it will no longer be available. However, it currently references effection@0.3.1-2f60e15 which will be available to install forever. |
taras
added a commit
that referenced
this pull request
Aug 24, 2025
…solution Added support for imports, relative imports and multiple entry points
taras
added a commit
that referenced
this pull request
Nov 12, 2025
…solution Added support for imports, relative imports and multiple entry points
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
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.
When debugging an effection application, we noticed that in the case where you had halted children, they were not being removed from parents that were still running. That meant that you have a fork tree looking like:
Which means that if the the parent is long running, then you can accrue lots of halted children which is a memory leak.
This makes sure that every time that a child joins its parent, it is removed from the list of children. This is safe because join only happens on finalization of a child.