Skip to content

Commit 670c60a

Browse files
authored
chore: Add missing scala doc for watchTermination operator. (#32824)
1 parent 9892c5e commit 670c60a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

akka-stream/src/main/scala/akka/stream/javadsl/Flow.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3725,6 +3725,9 @@ final class Flow[In, Out, Mat](delegate: scaladsl.Flow[In, Out, Mat]) extends Gr
37253725
* The future completes with success when received complete message from upstream or cancel
37263726
* from downstream. It fails with the same error when received error message from
37273727
* downstream.
3728+
*
3729+
* It is recommended to use the internally optimized `Keep.left` and `Keep.right` combiners
3730+
* where appropriate instead of manually writing functions that pass through one of the values.
37283731
*/
37293732
def watchTermination[M]()(matF: function.Function2[Mat, CompletionStage[Done], M]): javadsl.Flow[In, Out, M] =
37303733
new Flow(delegate.watchTermination()((left, right) => matF(left, right.asJava)))

akka-stream/src/main/scala/akka/stream/javadsl/Source.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4242,6 +4242,9 @@ final class Source[Out, Mat](delegate: scaladsl.Source[Out, Mat]) extends Graph[
42424242
* The Future completes with success when received complete message from upstream or cancel
42434243
* from downstream. It fails with the same error when received error message from
42444244
* downstream.
4245+
*
4246+
* It is recommended to use the internally optimized `Keep.left` and `Keep.right` combiners
4247+
* where appropriate instead of manually writing functions that pass through one of the values.
42454248
*/
42464249
def watchTermination[M]()(matF: function.Function2[Mat, CompletionStage[Done], M]): javadsl.Source[Out, M] =
42474250
new Source(delegate.watchTermination()((left, right) => matF(left, right.asJava)))

0 commit comments

Comments
 (0)