=str Fold InHandler and OutHandler for operator ActorRefBackpressureSource. (#31545)

This commit is contained in:
kerr 2022-09-05 14:43:26 +08:00 committed by GitHub
parent ab931a44d8
commit 601a2626e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,7 +37,8 @@ private object ActorRefBackpressureSource {
private[akka] override def createLogicAndMaterializedValue(
inheritedAttributes: Attributes,
eagerMaterializer: Materializer): (GraphStageLogic, ActorRef) = {
val stage: GraphStageLogic with StageLogging with ActorRefStage = new GraphStageLogic(shape)
val stage: GraphStageLogic with OutHandler with StageLogging with ActorRefStage = new GraphStageLogic(shape)
with OutHandler
with StageLogging
with ActorRefStage {
override protected def logSource: Class[_] = classOf[ActorRefSource[_]]
@ -84,11 +85,9 @@ private object ActorRefBackpressureSource {
}
}
setHandler(out, new OutHandler {
override def onPull(): Unit = {
tryPush()
}
})
override def onPull(): Unit = tryPush()
setHandler(out, this)
}
(stage, stage.ref)