Skip to content
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

Refactor subjects, introduce pipes #119

alexandru opened this Issue Feb 3, 2016 · 1 comment


None yet
1 participant
Copy link

alexandru commented Feb 3, 2016

New names because I'm obsessed with names:

  • SynchronousObserver => SyncObserver
  • SynchronousSubscriber => SyncSubscriber

Channel needs to go and be replaced by ConcurrentSubject. For one because ConcurrentSubject inherits from SyncObserver and so it can be used in place of an Observer. And also because of familiarity reasons, Channel introducing an unfamiliar noun for no good reason.

We are also introducing Pipe, which is a factory of subjects. The Pipe will have all of observable's transformation operators by abstracting those away into ObservableLike, the interface shared by Pipe and Observable.

abstract class Pipe[I, +O] extends ObservableLike[O, ({type λ[+α] = Pipe[I, α]})#λ] {
  /** Creates an in/out pair supporting a single subscriber */
  def unicast: (Observer[I], Observable[O])

  /** Creates an in/out pair supporting multiple subscribers */
  def multicast(implicit s: Scheduler): (Observer[I], Observable[O])

  def concurrent(strategy: Synchronous[I])(implicit s: Scheduler): (SyncObserver[I], Observable[O]) = {
    // provided default implementation based on the above

@alexandru alexandru self-assigned this Feb 3, 2016

@alexandru alexandru added this to the 2.0 milestone Feb 3, 2016

alexandru added a commit that referenced this issue Feb 3, 2016

alexandru added a commit that referenced this issue Feb 3, 2016

@alexandru alexandru changed the title Rename SynchronousObserver, SynchronousSubscriber, Channel, Subject Refactor subjects, introduce pipes Mar 2, 2016


This comment has been minimized.

Copy link
Member Author

alexandru commented Mar 2, 2016


@alexandru alexandru closed this Mar 2, 2016

alexandru added a commit that referenced this issue Mar 22, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.