-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[scheduler] pekko integration #1032
Conversation
import scala.concurrent.Promise | ||
import scala.concurrent.duration.* | ||
|
||
class KyoExecutorServiceConfiguratorTest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@He-Pin I think the last time I used Akka/Pekko was a decade ago :) Does it have custom locals/threadlocals that we need to check for propagation like in Finagle's integration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, NO, thread local is rarely used.
val actor = system.actorOf(Props(new Actor { | ||
def receive = { | ||
case _ => | ||
executorThread = Thread.currentThread() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better with an ask/?
and reply with the thread name,eg : apache/pekko#1728
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
case msg => | ||
threadNames.synchronized { | ||
threadNames += Thread.currentThread().getName | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just sender ! Thread.currentThread().getName
* [[org.apache.pekko.dispatch.ExecutorServiceConfigurator]] for the Pekko dispatcher interface | ||
*/ | ||
class KyoExecutorServiceConfigurator(config: Config, prerequisites: DispatcherPrerequisites) | ||
extends ExecutorServiceConfigurator(config, prerequisites) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we configure the Kyo scheduler in detail? Seems it's just using the default one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kyo's scheduler is designed to work as a JVM-global resource so it doesn't allow creating separate instances. It has several configs that can be set via system properties but I'd recommend trying the defaults first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
elegant
Co-authored-by: Ondra Pelech <[email protected]>
/release |
Fixes #1028