Skip to content
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

Nevermore adopt unpromise #79

Merged
merged 1 commit into from
Jun 4, 2024
Merged

Nevermore adopt unpromise #79

merged 1 commit into from
Jun 4, 2024

Conversation

cefn
Copy link
Owner

@cefn cefn commented May 14, 2024

Use unpromise implementation for Promise.race safety as well as for per-job cancelPromise cleanup.

This adopts the unpromise implementation to avoid memory leaks inherent to NodeJS Promise.race.

It also exploits the raceReferences static method to create readable race handling (retiring named race which created derived promises with string values to allow easy logical comparisons). Now it just returns the promise reference itself structured in a 1-tuple.

Fixes the bug in the readme where a function in a documentation example didn't have an async signature.

Removes the select signature from the default implementation of PartitionStore. This was not intended to be there, and must have been left over from when Store had a select signature. It was never in the declared return type so should be safe to remove (as no one could use it).

Adds back coverage support to the tests.

@cefn cefn force-pushed the nevermore-adopt-unpromise branch from c7c9e12 to 8ad171d Compare May 14, 2024 10:47
Establish pattern for jobs to each have a dedicated SubscribedPromise as a
cancelPromise. Simplify launcher code and use recursion not loop.
@cefn cefn force-pushed the nevermore-adopt-unpromise branch from 853b3c9 to fd57029 Compare June 4, 2024 14:04
@cefn cefn merged commit c4bc765 into main Jun 4, 2024
2 checks passed
@cefn cefn deleted the nevermore-adopt-unpromise branch June 4, 2024 14:10
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.

1 participant