Support for null in mapAsync and fromCompletionStage #25475

This commit is contained in:
mszczygiel 2019-04-16 09:08:05 +02:00 committed by Johan Andrén
parent 549ccb78a6
commit d4813b91c3
9 changed files with 134 additions and 48 deletions

View file

@ -18,6 +18,7 @@ Pass incoming elements to a function that return a @scala[`Future`] @java[`Compl
downstream. Up to `n` elements can be processed concurrently, but regardless of their completion time the incoming
order will be kept when results complete. For use cases where order does not matter `mapAsyncUnordered` can be used.
If a @scala[`Future`] @java[`CompletionStage`] completes with `null`, element is not passed downstream.
If a @scala[`Future`] @java[`CompletionStage`] fails, the stream also fails (unless a different supervision strategy is applied)

View file

@ -17,6 +17,7 @@ Like `mapAsync` but @scala[`Future`] @java[`CompletionStage`] results are passed
Like `mapAsync` but @scala[`Future`] @java[`CompletionStage`] results are passed downstream as they arrive regardless of the order of the elements
that triggered them.
If a @scala[`Future`] @java[`CompletionStage`] completes with `null`, element is not passed downstream.
If a @scala[`Future`] @java[`CompletionStage`] fails, the stream also fails (unless a different supervision strategy is applied)

View file

@ -15,7 +15,8 @@ Send the single value of the `CompletionStage` when it completes and there is de
## Description
Send the single value of the `CompletionStage` when it completes and there is demand.
If the future fails the stream is failed with that exception.
If the `CompletionStage` completes with `null` stage is completed without emitting a value.
If the `CompletionStage` fails the stream is failed with that exception.
@@@div { .callout }