He-Pin commented on code in PR #2117: URL: https://github.com/apache/pekko/pull/2117#discussion_r2312271537
########## stream/src/main/scala/org/apache/pekko/stream/SystemMaterializer.scala: ########## @@ -96,7 +96,11 @@ final class SystemMaterializer(system: ExtendedActorSystem) extends Extension { val materializer: Materializer = { // block on async creation to make it effectively final - Await.result(systemMaterializerPromise.future, materializerTimeout.duration) + val future = systemMaterializerPromise.future + future.value match { + case Some(value) => value.get + case _ => Await.result(future, materializerTimeout.duration) + } Review Comment: I think this can improve a little performance -- 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: notifications-unsubscr...@pekko.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org For additional commands, e-mail: notifications-h...@pekko.apache.org