Skip to content

Changed Observable.empty() into a stateless constant observable.#2622

Merged
akarnokd merged 1 commit intoReactiveX:1.xfrom
akarnokd:EmptyObservable
Feb 6, 2015
Merged

Changed Observable.empty() into a stateless constant observable.#2622
akarnokd merged 1 commit intoReactiveX:1.xfrom
akarnokd:EmptyObservable

Conversation

@akarnokd
Copy link
Member

@akarnokd akarnokd commented Feb 5, 2015

Empty was always stateless so creating a new instance all the time (especially through a from(Iterable)) is wasteful. Besides, onCompleted events don't have to be backpressured.

Should enable identity based optimizations discussed in #1653.

akarnokd added a commit that referenced this pull request Feb 6, 2015
Changed Observable.empty() into a stateless constant observable.
@akarnokd akarnokd merged commit 4182f65 into ReactiveX:1.x Feb 6, 2015
@akarnokd akarnokd deleted the EmptyObservable branch May 6, 2015 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant