Skip to content

allow contravariant use of Subscribers in Publisher.subscribe #104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rkuhn opened this issue Sep 1, 2014 · 11 comments · Fixed by #108
Closed

allow contravariant use of Subscribers in Publisher.subscribe #104

rkuhn opened this issue Sep 1, 2014 · 11 comments · Fixed by #108

Comments

@rkuhn
Copy link
Member

rkuhn commented Sep 1, 2014

Since Subscriber is inherently contravariant in its type parameter, it would be appropriate to express that at the only use-site we define:

public interface Publisher<T> {
  public void subscribe(Subscriber<? super T> sub);
}
@ldaley
Copy link
Contributor

ldaley commented Sep 2, 2014

+1

2 similar comments
@benjchristensen
Copy link
Contributor

👍

@jrudolph
Copy link

jrudolph commented Sep 2, 2014

👍

rkuhn added a commit to rkuhn/reactive-streams that referenced this issue Sep 2, 2014
@rkuhn
Copy link
Member Author

rkuhn commented Sep 2, 2014

PR opened; @purplefox @normanmaurer @mariusaeriksen @tmontgomery please vote, perhaps we can get this into M2 which should then hopefully have the final interfaces for 1.0.

@smaldini
Copy link
Contributor

smaldini commented Sep 2, 2014

+1

@smaldini
Copy link
Contributor

smaldini commented Sep 2, 2014

4 votes == ok ?

@rkuhn
Copy link
Member Author

rkuhn commented Sep 2, 2014

still lacking one of Red Hat / Twitter / Kaazing according to the rules

@normanmaurer
Copy link
Member

@rkuhn was not really able to follow the work much lately. But from what I read here it makes sense. So +1 I would say.

@rkuhn
Copy link
Member Author

rkuhn commented Sep 2, 2014

Coolio, so I guess that this can go into 0.4.0.M2 today. @smaldini can you do the honors? (i.e. press the merge button)

@tmontgomery
Copy link

👍

@smaldini
Copy link
Contributor

smaldini commented Sep 2, 2014

Cheers everyone !

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 a pull request may close this issue.

7 participants