Avoid deadlock on concurrent extension with materializer init (#28046)

* Avoid deadlock on concurrent extension with materializer init #28037

* Wrap blocking extension await with blocking context
This commit is contained in:
Johan Andrén 2019-10-25 18:05:59 +02:00 committed by Christopher Batey
parent ab3f63899c
commit a56a53734f
5 changed files with 72 additions and 4 deletions

View file

@ -105,8 +105,9 @@ import com.github.ghik.silencer.silent
attributes: Attributes): PhasedFusingActorMaterializer = {
val haveShutDown = new AtomicBoolean(false)
val dispatcher = attributes.mandatoryAttribute[ActorAttributes.Dispatcher].dispatcher
val supervisorProps =
StreamSupervisor.props(attributes, haveShutDown).withDispatcher(context.props.dispatcher).withDeploy(Deploy.local)
StreamSupervisor.props(attributes, haveShutDown).withDispatcher(dispatcher).withDeploy(Deploy.local)
// FIXME why do we need a global unique name for the child?
val streamSupervisor = context.actorOf(supervisorProps, StreamSupervisor.nextName())