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

use AbortSignal.any if possible #3779

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tsctx
Copy link
Member

@tsctx tsctx commented Oct 28, 2024

AbortSignal.any exists from the lowest version currently supported, which simplifies the handling of AbortSignal.
Also, tests that are no longer needed as a result of this have been removed.

@tsctx tsctx changed the title use AbortSignal.any instead of addEventListener use AbortSignal.any if possible Oct 28, 2024
@tsctx
Copy link
Member Author

tsctx commented Oct 28, 2024

Only available after v23 (nodejs/node@d473606) due to event firing order issues.

Copy link
Member

@KhafraDev KhafraDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe there are a number of memory leaks related to AbortSignal.any.

edit: Yeah, there are.
nodejs/node#54614
nodejs/node#55328
nodejs/node#55354 (which has only made it into v23.1.0 so far)

@tsctx
Copy link
Member Author

tsctx commented Oct 29, 2024

Let's wait until the fix patch lands on LTS.

@KhafraDev
Copy link
Member

There are two issues without patches yet and then we'll have to manage both the AbortSignal.any path and our own. Is there any benefit in using AbortSignal.any? I see that the issues mentioned that this PR would fix were removed.

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.

2 participants