Skip to content

Conversation

@andersio
Copy link
Member

@andersio andersio commented May 26, 2017

  1. Fold ActionDisposable and SimpleDisposable into AnyDisposable.

  2. Move += operator to the concrete types.

@andersio andersio force-pushed the use-anydisposable branch 2 times, most recently from 58ffb12 to aaf2c30 Compare May 26, 2017 21:42
@andersio andersio changed the title s/(Disposable|ActionDisposable)/AnyDisposable/g s/ActionDisposable/AnyDisposable/g May 26, 2017
@andersio andersio force-pushed the use-anydisposable branch 4 times, most recently from 9c6e4ec to 23ae621 Compare May 26, 2017 22:01
@andersio andersio changed the title s/ActionDisposable/AnyDisposable/g s/(ActionDisposable|SimpleDisposable)/AnyDisposable/g May 26, 2017
@andersio andersio force-pushed the use-anydisposable branch 3 times, most recently from 5c49da0 to aaaa1b6 Compare May 26, 2017 22:16
/// work.
public final class SimpleDisposable: Disposable {
private var state = UnsafeAtomicState(DisposableState.active)
private let base: Backing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't care for this implementation. I find this "multiple implementation via a backing enum" approach to be difficult to reason about.

If we kept SimpleDisposable and ActionDisposable, but made them private and added inits that exposed the functionality publicly, then I think I'd be onboard.

Copy link
Member Author

@andersio andersio May 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True. That does sound better.

@andersio andersio force-pushed the use-anydisposable branch from aaaa1b6 to 69c8db3 Compare May 28, 2017 18:14
@andersio andersio merged commit 557dbfe into master May 29, 2017
@andersio andersio deleted the use-anydisposable branch May 29, 2017 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants