+str - Deletes FuturePublisher and replaces it with Source.single(f).mapAsync(1)(identity)

This commit is contained in:
Viktor Klang 2015-06-06 14:13:26 +02:00
parent 8527e0347e
commit 79b6de1558
5 changed files with 8 additions and 184 deletions

View file

@ -225,7 +225,7 @@ object Source extends SourceApply {
* The stream terminates with a failure if the `Future` is completed with a failure.
*/
def apply[T](future: Future[T]): Source[T, Unit] =
new Source(new FutureSource(future, DefaultAttributes.futureSource, shape("FutureSource")))
Source.single(future).mapAsync(1)(identity).withAttributes(DefaultAttributes.futureSource)
/**
* Elements are emitted periodically with the specified interval.