views:

184

answers:

2

I have a project that is actor-based and for 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!

+2  A: 

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.

aioobe
+5  A: 

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

Robert Harvey
does Scala have a feature for pooling Actors?
ghedas