score:1

first of all, always use the documentation for the version you're using, in your case you're linking to the snapshot documentation which is for an unreleased akka version (i.e. a snapshot).

here's the 2.1.2 docs: http://doc.akka.io/docs/akka/2.1.2/scala/dispatchers.html (also accessible from doc.akka.io)

when we look at that page, we see that under the example configuration for fork-join-executor and thread-pool-executor it says: "for more options, see the default-dispatcher section of the configuration.", linking to:

where we can find:

  # this will be used if you have set "executor = "thread-pool-executor""
  thread-pool-executor {
    # keep alive time for threads
    keep-alive-time = 60s

    # min number of threads to cap factor-based core number to
    core-pool-size-min = 8

    # the core pool size factor is used to determine thread pool core size
    # using the following formula: ceil(available processors * factor).
    # resulting size is then bounded by the core-pool-size-min and
    # core-pool-size-max values.
    core-pool-size-factor = 3.0

    # max number of threads to cap factor-based number to
    core-pool-size-max = 64

    # minimum number of threads to cap factor-based max number to
    # (if using a bounded task queue)
    max-pool-size-min = 8

    # max no of threads (if using a bounded task queue) is determined by
    # calculating: ceil(available processors * factor)
    max-pool-size-factor  = 3.0

    # max number of threads to cap factor-based max number to
    # (if using a  bounded task queue)
    max-pool-size-max = 64

    # specifies the bounded capacity of the task queue (< 1 == unbounded)
    task-queue-size = -1

    # specifies which type of task queue will be used, can be "array" or
    # "linked" (default)
    task-queue-type = "linked"

    # allow core threads to time out
    allow-core-timeout = on
  }

so to conclude, you need to set the default-dispatcher to use the "thread-pool-executor" if you want to use the threadpoolexecutor, by akka.default-dispatcher.executor = "thread-pool-executor" and then specify your configuration for that thread-pool-executor.

does that help?

cheers, √


Related Query

More Query from same tag