2018-04-18 10:26:53 +02:00
|
|
|
# fromFuture
|
|
|
|
|
|
2019-10-16 17:02:12 +02:00
|
|
|
`fromFuture` has been deprecated in 2.6.0, use `Source.future` instead.
|
2018-04-18 10:26:53 +02:00
|
|
|
|
2018-05-29 17:00:48 +09:00
|
|
|
@ref[Source operators](../index.md#source-operators)
|
2018-04-18 11:44:37 +02:00
|
|
|
|
|
|
|
|
@@@div { .group-scala }
|
|
|
|
|
|
2018-04-18 10:26:53 +02:00
|
|
|
## Signature
|
|
|
|
|
|
2018-09-13 10:49:51 +02:00
|
|
|
@@signature [Source.scala](/akka-stream/src/main/scala/akka/stream/scaladsl/Source.scala) { #fromFuture }
|
2018-04-18 11:44:37 +02:00
|
|
|
|
|
|
|
|
@@@
|
|
|
|
|
|
2018-04-18 10:26:53 +02:00
|
|
|
## Description
|
|
|
|
|
|
2019-10-16 17:02:12 +02:00
|
|
|
`fromFuture` has been deprecated in 2.6.0, use @ref:[future](future.md) instead.
|
|
|
|
|
|
2018-04-18 10:26:53 +02:00
|
|
|
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.
|
|
|
|
|
|
2019-10-04 15:46:05 +02:00
|
|
|
## Reactive Streams semantics
|
2018-04-18 10:26:53 +02:00
|
|
|
|
|
|
|
|
@@@div { .callout }
|
|
|
|
|
|
|
|
|
|
**emits** the future completes
|
|
|
|
|
|
|
|
|
|
**completes** after the future has completed
|
|
|
|
|
|
|
|
|
|
@@@
|