Merge pull request #16183 from spray/wip-15674-mathias
Refactor, improve Multipart model
This commit is contained in:
commit
159adb79b3
14 changed files with 699 additions and 485 deletions
|
|
@ -168,10 +168,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