Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

CompositeDisposable: add shouldn't be ignored when already disposed #49

@wbinnssmith

Description

@wbinnssmith

It seems dangerous for a CompositeDisposable to do nothing if another disposable is added after the CompositeDisposable has been disposed.

For instance, Nuclide's UniversalDisposable immediately throws if it's been disposed of itself, and RxJS's Subscription immediately
unsubscribes from the passed subscription
.

Throwing seems like a pretty good option in my opinion as I can't think of a good reason to add to an already disposed composite disposable, but maybe there is?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions