From 9394e07cf05c7be88ed0df2eb9ef30609bb4dca1 Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Wed, 8 Mar 2017 16:49:44 +0100 Subject: [PATCH] add a note about dispatcher creating async boundary, #22436 --- akka-docs/rst/project/migration-guide-2.4.x-2.5.x.rst | 8 ++++++++ akka-stream/src/main/scala/akka/stream/Attributes.scala | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/akka-docs/rst/project/migration-guide-2.4.x-2.5.x.rst b/akka-docs/rst/project/migration-guide-2.4.x-2.5.x.rst index 02950a54c1..a3b79511ce 100644 --- a/akka-docs/rst/project/migration-guide-2.4.x-2.5.x.rst +++ b/akka-docs/rst/project/migration-guide-2.4.x-2.5.x.rst @@ -287,6 +287,14 @@ which explains using and implementing GraphStages in more practical terms than t .. _Mastering GraphStages, part I: http://blog.akka.io/streams/2016/07/30/mastering-graph-stage-part-1 +Dispatcher attribute +-------------------- + +The ``ActorAttributes.dispatcher`` attribute is adding an async boundary in 2.5, since that is the typical desired behavior. +In 2.4 an explicit `async` marker (``AsyncBoundary`` attribute) had to be added. For example, this means that ``Source`` that +defined ``blocking-io-dispatcher`` as default followed by a ``map`` will now be separated by an async boundary, which was not +the case in 2.4. + Remote ====== diff --git a/akka-stream/src/main/scala/akka/stream/Attributes.scala b/akka-stream/src/main/scala/akka/stream/Attributes.scala index 11a3ea968d..94fb73b8d4 100644 --- a/akka-stream/src/main/scala/akka/stream/Attributes.scala +++ b/akka-stream/src/main/scala/akka/stream/Attributes.scala @@ -265,7 +265,7 @@ object ActorAttributes { val IODispatcher: Dispatcher = ActorAttributes.Dispatcher("akka.stream.default-blocking-io-dispatcher") /** - * Specifies the name of the dispatcher. + * Specifies the name of the dispatcher. This also adds an async boundary. */ def dispatcher(dispatcher: String): Attributes = Attributes(Dispatcher(dispatcher))