=str #22448 rewrite Source.empty to GraphStage
This commit is contained in:
parent
0367812e40
commit
e47dbda154
6 changed files with 115 additions and 10 deletions
|
|
@ -331,11 +331,7 @@ object Source {
|
|||
*/
|
||||
def empty[T]: Source[T, NotUsed] = _empty
|
||||
private[this] val _empty: Source[Nothing, NotUsed] =
|
||||
new Source(
|
||||
new PublisherSource[Nothing](
|
||||
EmptyPublisher,
|
||||
DefaultAttributes.emptySource,
|
||||
shape("EmptySource")))
|
||||
Source.fromGraph(EmptySource)
|
||||
|
||||
/**
|
||||
* Create a `Source` which materializes a [[scala.concurrent.Promise]] which controls what element
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue