Skip to content

subscribe() should have a symmetric twin unsubscribe() #148

Open
@mk-pmb

Description

@mk-pmb

… so that wrapper functions can use their same existing function reference for both, rather than having to instantiate an AbortController.

Edit: Some people may want to protect their subscription from "unauthorized" unsubscribe(). We can easily achieve this by exempting subscriptions that have been made with an explicit AbortController signal for unsubscribing, or where false was given instead of such a signal. (The latter may be moot if there's a reliable built-in "never" signal available at no additional memory cost.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    possible future enhancementAn enhancement that doesn't block standardization or shipping

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions