Use 'same thread' execution context in UnfoldResourceSourceAsync (#24911)
This commit is contained in:
parent
ef47004c71
commit
8cdb3feb99
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue