Skip to content

Commit

Permalink
mark function tail recursive (#780)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning authored Nov 6, 2023
1 parent 9c19c91 commit 99b4df3
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 99b4df3

Please sign in to comment.