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

feat(runtime/spawn): add AbortSignal support #14538

Merged
merged 5 commits into from
May 11, 2022

Conversation

crowlKats
Copy link
Member

@crowlKats crowlKats commented May 9, 2022

Equivalent of #11579 for the new API

this.#status = core.opAsync("op_spawn_wait", this.#rid).then((res) => {
this.#rid = null;
signal?.[remove](onAbort);
Copy link
Member

@dsherret dsherret May 10, 2022

Choose a reason for hiding this comment

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

Should this be done in a .finally(...) so this gets unsubscribed if it ever throws? What about this.#rid = null?

Copy link
Member Author

@crowlKats crowlKats May 10, 2022

Choose a reason for hiding this comment

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

I dont think there is a scenario this would throw, and if it does, then i'd consider that a bug to some degree

@crowlKats crowlKats changed the title feat(runtime/spawn): add signal support to abort subprocess feat(runtime/spawn): add AbortSignal support May 11, 2022
@crowlKats crowlKats merged commit b67f874 into denoland:main May 11, 2022
@crowlKats crowlKats deleted the spawn_signal branch May 11, 2022 05:59
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.

None yet

3 participants