Acting pool in scala

I have an actor-based project, and for its part I have to use some participants who receive a message after one actor assigns each request separately, and each actor is responsible for fulfilling his message request, so I need something as a thread pool for members of my project, are there any features in Scala that are useful for my need?

I have one more question: my project has a large number of requests, and these requests should be executed as soon as possible, so I thought that they need an actor pool to process them, is there any function in Scala that is related to my requirement ?


there are a lot of tanks for your attention!

+3
source share
2 answers

Actors [are already] running in the thread pool. Initially, there are 4 workflows. The thread pool grows if all worker threads are blocked, but there are still tasks that need to be processed. Ideally, the thread pool size corresponds to the number of processor cores of the machine.

http://www.scala-lang.org/node/242

+7
source

This is described in detail in this section . The seventh slide count from the end describes event driven participants running in the thread pool. I believe that this is without any third-party library. Everything is built.

+3
source

Source: https://habr.com/ru/post/1745994/


All Articles