Skip to content

Stream unsubscription interop #16

Description

@dariomannu

Describe the solution

Currently you can "unsubscribe" from a stream with subscription.cancel(), which is fine.

Most other reactive code around, designed for RxJS, still uses .unsubscribe(), though.
Other (minor) Observable implementations have subscribe as a function that returns an unsubscribe function subscribe = () => unsubscribe .
The WICG proposal went for the AbortController as the only way to cancel an Observable, to address the rare, but so called sync firehose issue

I know, not great having so many different interfaces for portability.

Is there any wish for Eventkit to become interoperable with any of these alternatives, by any chance?
The AbortController might be the nastiest one to integrate (IMO), but... if that's what the standards want to go for, it might be useful to consider... Also, creating a .unsubscribe() alias should be trivial, on the other hand, to help the transition?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions