From 2bd21c169145ff776392e1f04a679b704f3545c8 Mon Sep 17 00:00:00 2001 From: Christopher Batey Date: Thu, 15 Mar 2018 18:01:24 -0700 Subject: [PATCH] Improve Source.queue scala doc based on user feedback (#24734) --- akka-stream/src/main/scala/akka/stream/javadsl/Queue.scala | 7 +++++-- .../src/main/scala/akka/stream/scaladsl/Queue.scala | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/akka-stream/src/main/scala/akka/stream/javadsl/Queue.scala b/akka-stream/src/main/scala/akka/stream/javadsl/Queue.scala index 6e50875352..e31e45232b 100644 --- a/akka-stream/src/main/scala/akka/stream/javadsl/Queue.scala +++ b/akka-stream/src/main/scala/akka/stream/javadsl/Queue.scala @@ -23,8 +23,11 @@ trait SourceQueue[T] { * - completes with `Dropped` when stream dropped offered element * - completes with `QueueClosed` when stream is completed during future is active * - completes with `Failure(f)` when failure to enqueue element from upstream - * - fails when stream is completed or you cannot call offer in this moment because of implementation rules - * (like for backpressure mode and full buffer you need to wait for last offer call Future completion) + * - fails when stream is completed + * + * Additionally when using the backpressure overflowStrategy: + * - If the buffer is full the Future won't be completed until there is space in the buffer + * - Calling offer before the Future is completed in this case will return a failed Future * * @param elem element to send to a stream */ diff --git a/akka-stream/src/main/scala/akka/stream/scaladsl/Queue.scala b/akka-stream/src/main/scala/akka/stream/scaladsl/Queue.scala index bf0462de91..e9b91c5f9c 100644 --- a/akka-stream/src/main/scala/akka/stream/scaladsl/Queue.scala +++ b/akka-stream/src/main/scala/akka/stream/scaladsl/Queue.scala @@ -23,8 +23,11 @@ trait SourceQueue[T] { * - completes with `Dropped` when stream dropped offered element * - completes with `QueueClosed` when stream is completed during future is active * - completes with `Failure(f)` when failure to enqueue element from upstream - * - fails when stream is completed or you cannot call offer in this moment because of implementation rules - * (like for backpressure mode and full buffer you need to wait for last offer call Future completion) + * - fails when stream is completed + * + * Additionally when using the backpressure overflowStrategy: + * - If the buffer is full the Future won't be completed until there is space in the buffer + * - Calling offer before the Future is completed in this case will return a failed Future * * @param elem element to send to a stream */