开发者

How can I add more threads to the forkjoinpool

I recently su开发者_StackOverflowccessfully experimented with Scala futures. I'm pleased as punch with the gains I'm seeing from the parallelism, but I'm only seeing 4 worker threads.

I've been looking all over for how I can crank up the number of threads to 11, but no luck. How can I do this?


Check out the source at http://www.scala-lang.org/api/current/index.html#scala.actors.scheduler.ResizableThreadPoolScheduler

There are some system properties: actors.corePoolSize and actors.maxPoolSize. Looks you can adjust those, and the scheduler for daemon-like things (including futures) will get a larger number. By default it picks up on the number of processors, I guess.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜