Skip to content

Cancellation APIs #10181

@benjamingr

Description

@benjamingr

Hey,

It would be really cool if Deno aligned with the web platform's cancellation primitive AbortSignal/AbortController which Deno already supports but not in most of its APIs.

Myself and a few others have been adding support for AbortSignal to all of the APIs it fits in Node.js to make it easier for people to write universal JavaScript code. For example:

Deno.readTextFile('./someFile', { signal });
Deno.writeTextFile('./someFile', { signal });

And more generally - in Deno's stream abstractions. Would you be open to adding this?

(Sorry for not being too available on Discord with the baby/health stuff/new job :))

Metadata

Metadata

Assignees

No one assigned

    Labels

    public APIrelated to "Deno" namespace in JSsuggestionsuggestions for new features (yet to be agreed)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions