pekko/akka-docs/src/main/paradox/stream/reference/fromIterator.md
Luc Bourlier 7b29b08d46 Adds support for the signature directive to the paradox configuration
(copied from the akka-http configuration)
2018-04-23 13:18:25 +02:00

775 B

fromIterator

Stream the values from an Iterator, requesting the next value when there is demand.

Signature

@@signature BasicDirectives.scala { #fromIterator }

Description

Stream the values from an Iterator, requesting the next value when there is demand. The iterator will be created anew for each materialization, which is the reason the @scala[method] @java[factory] takes a @scala[function] @java[Creator] rather than an Iterator directly.

If the iterator perform blocking operations, make sure to run it on a separate dispatcher.

@@@div { .callout }

emits the next value returned from the iterator

completes when the iterator reaches its end

@@@

Example