我们可以将并行度级别配置为特定数字,如下所示:
my-thread-pool-dispatcher {
type = Dispatcher
executor = "thread-pool-executor"
thread-pool-executor {
core-pool-size-min = 2
core-pool-size-factor = 2.0
core-pool-size-max = 10
}
throughput = 100
}
但是,因为我想在多个环境中使用此配置,我想设置core-pool-size-max=Runtime.getRuntime().availableProcessors()
。有没有办法通过配置来做到这一点?