Skip to content

AsyncComputed: can't abort a running computation when no longer needed #87

@d13

Description

@d13

When using an AsyncComputed in a "lifecycled" resource, I'm unable to abort a running computation.

In my use-case, a web component, it would be handy to have an abort() method that I could call within a component's disconnectedCallback.

It'd probably be brownie points to also expose a [Symbol.dispose]() too for those using the new using keyword in TS 5.2 along with future support for TC39.

I started noodling it on here: main...d13:signal-utils:dispose-async-computed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions