This is an automated email from the ASF dual-hosted git repository.

fanningpj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-pekko.git


The following commit(s) were added to refs/heads/main by this push:
     new 99b4df31d4 mark function tail recursive (#780)
99b4df31d4 is described below

commit 99b4df31d4c008363c3a6b05e66523d492f2a8ce
Author: PJ Fanning <[email protected]>
AuthorDate: Tue Nov 7 00:15:11 2023 +0100

    mark function tail recursive (#780)
---
 actor/src/main/scala/org/apache/pekko/dispatch/Dispatchers.scala | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/Dispatchers.scala 
b/actor/src/main/scala/org/apache/pekko/dispatch/Dispatchers.scala
index 7d754c5447..791cba0ff0 100644
--- a/actor/src/main/scala/org/apache/pekko/dispatch/Dispatchers.scala
+++ b/actor/src/main/scala/org/apache/pekko/dispatch/Dispatchers.scala
@@ -14,12 +14,9 @@
 package org.apache.pekko.dispatch
 
 import java.util.concurrent.{ ConcurrentHashMap, ThreadFactory }
-
 import scala.concurrent.ExecutionContext
-
-import scala.annotation.nowarn
+import scala.annotation.{ nowarn, tailrec }
 import com.typesafe.config.{ Config, ConfigFactory, ConfigValueType }
-
 import org.apache.pekko
 import pekko.ConfigurationException
 import pekko.actor.{ ActorSystem, DynamicAccess, Scheduler }
@@ -83,6 +80,7 @@ object Dispatchers {
    *
    * Get (possibly aliased) dispatcher config. Returns empty config if not 
found.
    */
+  @tailrec
   private[pekko] def getConfig(config: Config, id: String, depth: Int = 0): 
Config = {
     if (depth > MaxDispatcherAliasDepth)
       ConfigFactory.empty(s"Didn't find dispatcher config after 
$MaxDispatcherAliasDepth aliases")


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to