pjfanning commented on code in PR #627:
URL: https://github.com/apache/incubator-pekko/pull/627#discussion_r1337114617
##########
stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:
##########
@@ -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
Review Comment:
Can we make this a `def`? In most places in this source file, this is a
`def`.
The `def` means no synchronize block. `lazy val`s come with the overhead of
having `synchronize` in the generated byte code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]