arunpandianp commented on PR #30270: URL: https://github.com/apache/beam/pull/30270#issuecomment-1936794224
> > > > LGTM except for the redundant synchronized block > > > > > > > > > are you talking about the sync block on line 323? > > > > > > No, recordActiveMessageInProcessingTimesMap is synchronized and there is also a synchronized block inside which is redundant. > > i think that is necessary cause compute spins off a new thread. if i remove it, the guardedby annotation complains processingTimesByStep is a HashMap, HashMap::compute executes the passed in function inline on the same thread. ref: https://docs.oracle.com/javase/8/docs/api/java/util/HashMap.html#compute-K-java.util.function.BiFunction- -- 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]
