-
Notifications
You must be signed in to change notification settings - Fork 333
Description
Relates to #1352
The existing ThreadPoolConfigCopyAdvice kamon-pekko doesn't work for Pekko 1.1 when Scala 2.13 is used. Pekko 1.1 has Scala 2 compiler inlining enabled. ThreadPoolConfig is a final case class and the copy function is derived by the Scala compiler. When a class is final, all its functions are final and can be inlined. Since the copy function is not explicitly declared, I haven't found a way to mark it as @noinline. I even tried adding the annotation to the case class.
onType("org.apache.pekko.dispatch.ThreadPoolConfig")
.mixin(classOf[HasDispatcherPrerequisites.Mixin])
.advise(method("copy"), classOf[ThreadPoolConfigCopyAdvice])
Would it be feasible to try replacing this instrumentation point and concentrating on the PinnedDispatcher constructor instead?
https://github.com/apache/pekko/blob/22a738511375baa23c5b84c87d44a065c0401e0e/actor/src/main/scala/org/apache/pekko/dispatch/PinnedDispatcher.scala#L28
fyi @hughsimpson