You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by he...@apache.org on 2025/08/31 05:52:35 UTC
(pekko) branch await created (now b035472e2b)
This is an automated email from the ASF dual-hosted git repository.
hepin pushed a change to branch await
in repository https://gitbox.apache.org/repos/asf/pekko.git
at b035472e2b chore: Test if materializerPromise is already completed first.
This branch includes the following new commits:
new b035472e2b chore: Test if materializerPromise is already completed first.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org
(pekko) 01/01: chore: Test if materializerPromise is already completed first.
Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
hepin pushed a commit to branch await
in repository https://gitbox.apache.org/repos/asf/pekko.git
commit b035472e2bf3a1e0c841d40f8e58c80c12f1751a
Author: He-Pin <he...@gmail.com>
AuthorDate: Sun Aug 31 13:52:21 2025 +0800
chore: Test if materializerPromise is already completed first.
---
.../src/main/scala/org/apache/pekko/stream/SystemMaterializer.scala | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/stream/src/main/scala/org/apache/pekko/stream/SystemMaterializer.scala b/stream/src/main/scala/org/apache/pekko/stream/SystemMaterializer.scala
index efd829d47d..05e18d97e4 100644
--- a/stream/src/main/scala/org/apache/pekko/stream/SystemMaterializer.scala
+++ b/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)
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org