Use 'same thread' execution context in UnfoldResourceSourceAsync (#24911)

This commit is contained in:
Dmitry 2018-04-30 03:32:05 +01:00 committed by Konrad `ktoso` Malawski
parent ef47004c71
commit 8cdb3feb99

View file

@ -6,6 +6,7 @@ package akka.stream.impl
import akka.Done
import akka.annotation.InternalApi
import akka.dispatch.ExecutionContexts.sameThreadExecutionContext
import akka.stream.ActorAttributes.SupervisionStrategy
import akka.stream._
import akka.stream.impl.Stages.DefaultAttributes
@ -74,7 +75,7 @@ import scala.util.control.NonFatal
state match {
case Some(resource)
try {
readData(resource).onComplete(readCallback)
readData(resource).onComplete(readCallback)(sameThreadExecutionContext)
} catch errorHandler
case None
// we got a pull but there is no open resource, we are either