!str switch to a stable Source.empty val
This commit is contained in:
parent
292afaa4d0
commit
57efc12fb1
1 changed files with 3 additions and 3 deletions
|
|
@ -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`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue