!str switch to a stable Source.empty val

This commit is contained in:
Mathias 2014-10-30 17:04:36 +01:00 committed by Johannes Rudolph
parent 292afaa4d0
commit 57efc12fb1

View file

@ -167,10 +167,10 @@ object Source {
def singleton[T](element: T): Source[T] = apply(SynchronousPublisherFromIterable(List(element)))
/**
* Create a `Source` with no elements, i.e. an empty stream that is completed immediately
* for every connected `Sink`.
* A `Source` with no elements, i.e. an empty stream that is completed immediately for every connected `Sink`.
*/
def empty[T](): Source[T] = apply(EmptyPublisher[T])
def empty[T](): Source[T] = _empty
private[this] val _empty: Source[Nothing] = apply(EmptyPublisher)
/**
* Create a `Source` that immediately ends the stream with the `cause` error to every connected `Sink`.