Merge pull request #16183 from spray/wip-15674-mathias

Refactor, improve Multipart model
This commit is contained in:
Björn Antonsson 2014-11-03 16:06:16 +01:00
commit 159adb79b3
14 changed files with 699 additions and 485 deletions

View file

@ -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`.