2018-04-18 10:26:53 +02:00
|
|
|
# fromFuture
|
|
|
|
|
|
|
|
|
|
Send the single value of the `Future` when it completes and there is demand.
|
|
|
|
|
|
2018-04-18 11:44:37 +02:00
|
|
|
@ref[Source stages](../index.md#source-stages)
|
|
|
|
|
|
|
|
|
|
@@@div { .group-scala }
|
|
|
|
|
|
2018-04-18 10:26:53 +02:00
|
|
|
## Signature
|
|
|
|
|
|
2018-04-18 11:44:37 +02:00
|
|
|
@@signature [Source.scala]($akka$/akka-stream/src/main/scala/akka/stream/scaladsl/Source.scala) { #fromFuture }
|
|
|
|
|
|
|
|
|
|
@@@
|
|
|
|
|
|
2018-04-18 10:26:53 +02:00
|
|
|
## Description
|
|
|
|
|
|
|
|
|
|
Send the single value of the `Future` when it completes and there is demand.
|
|
|
|
|
If the future fails the stream is failed with that exception.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@@div { .callout }
|
|
|
|
|
|
|
|
|
|
**emits** the future completes
|
|
|
|
|
|
|
|
|
|
**completes** after the future has completed
|
|
|
|
|
|
|
|
|
|
@@@
|
|
|
|
|
|