Actor pool in scala
I have a project that is actor-based and f开发者_开发百科or one part of it I must use some actors that receive message after that one actor assigns to each request separately and each actor is responsible for doing its message request, so I need something like a thread pool for actors of my project, are there any features in Scala that is useful for my necessity?
I have another question: My project has a great amount of requests and also these requests must be done as soon as possible so I thought that an actor-pool is necessary for handling them, is there any feature in Scala that is related to my demand?
tanks a lot for your attention!Actors are [already] executed on a thread pool. Initially, there are 4 worker threads. The thread pool grows if all worker threads are blocked but there are still remaining tasks to be processed. Ideally, the size of the thread pool corresponds to the number of processor cores of the machine.
http://www.scala-lang.org/node/242
This is described in detail in this talk. Seventh slide counting from the end describes event driven actors running on a thread pool. This is without any third party library i believe. All built in.
精彩评论