Skip to content

🗑️ Disposable lifecycle handlers. 'Disposables' are source-agnostic and can represent custom handlers or wrap Swift Tasks, Combine Cancellable, RxSwift Disposables, etc.

License

GoodHatsLLC/Disposable

Repository files navigation

Disposable 🗑️

A Disposable is a cancellation handler representing arbitrary long running work.

This library is used in the Emitter reactive streams library and internally within the StateTree framework.

Purpose

A Disposable is intended to bridge different cancellable sources including:

  • Combine's Cancellable's cancel()
  • Swift's Task's cancel()

This package also provides a DisposableStage which allows for grouping Disposables and handling them as a single entity — i.e. as Combine uses Set<AnyCancellable> and RxSwift uses DisposeBag.

About

🗑️ Disposable lifecycle handlers. 'Disposables' are source-agnostic and can represent custom handlers or wrap Swift Tasks, Combine Cancellable, RxSwift Disposables, etc.

Topics

Resources

License

Stars

Watchers

Forks