Skip to content

Commit

Permalink
=str Make decider a lazy val.
Browse files Browse the repository at this point in the history
  • Loading branch information
He-Pin committed Sep 27, 2023
1 parent ac14251 commit cdfcc56
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ private[stream] object Collect {

def createLogic(inheritedAttributes: Attributes): GraphStageLogic =
new GraphStageLogic(shape) with InHandler with OutHandler {
val decider = inheritedAttributes.mandatoryAttribute[SupervisionStrategy].decider
lazy val decider = inheritedAttributes.mandatoryAttribute[SupervisionStrategy].decider

private var aggregator: Out = zero
private var aggregating: Future[Out] = Future.successful(aggregator)
Expand Down Expand Up @@ -1402,8 +1402,7 @@ private[stream] object Collect {
new GraphStageLogic(shape) with InHandler with OutHandler {
override def toString = s"MapAsyncUnordered.Logic(inFlight=$inFlight, buffer=$buffer)"

private val decider =
inheritedAttributes.mandatoryAttribute[SupervisionStrategy].decider
private lazy val decider = inheritedAttributes.mandatoryAttribute[SupervisionStrategy].decider

private var inFlight = 0
private var buffer: BufferImpl[Out] = _
Expand Down

0 comments on commit cdfcc56

Please sign in to comment.