Skip to content

1.x: promote UnicastSubject to be a standard+experimental Subject#3936

Merged
akarnokd merged 1 commit intoReactiveX:1.xfrom
akarnokd:UnicastSubjectPromote
Jun 1, 2016
Merged

1.x: promote UnicastSubject to be a standard+experimental Subject#3936
akarnokd merged 1 commit intoReactiveX:1.xfrom
akarnokd:UnicastSubjectPromote

Conversation

@akarnokd
Copy link
Member

Plus, the unsubscribe indirection has been inlined, making State implement Subscription directly (instead of Action0 + Subscriptions.create).

public void call(Subscriber<? super T> subscriber) {
if (this.subscriber.compareAndSet(null, subscriber)) {
subscriber.add(Subscriptions.create(this));
subscriber.add(this);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice 👍

*
* @param <T> the input and output value type
*/
@Experimental
Copy link
Contributor

Choose a reason for hiding this comment

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

We can't promote it for public usage without tests!

Copy link
Member Author

Choose a reason for hiding this comment

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

It is tested through window operators and there is BufferUntilSubscriberTest.

@zsxwing
Copy link
Member

zsxwing commented Jun 1, 2016

👍

@akarnokd akarnokd merged commit 271c83b into ReactiveX:1.x Jun 1, 2016
@akarnokd akarnokd deleted the UnicastSubjectPromote branch June 1, 2016 21:54
@stevegury
Copy link
Member

👍

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.

5 participants