No, it will allocate as many threads in addition as are used by blocking sections—unless the thread factory returns `null` at some point (which we didn’t know back then, so it is not yet implemented as a limiting feature).
ForkJoinPool is really intended for fork-join computations, we just use it because it also happens to scale a lot better across CPU sockets than the normal ThreadPoolExecutor’s central submission queue. But in the end we will probably have to write our own actor executor. Regards, Roland > 3 feb 2016 kl. 12:01 skrev rklaehn <[email protected]>: > > Thanks. > > If I set fork-join-executor.parallelism-max to some reasonable value, the > dispatcher will not allocate more threads even when entering blocking > sections, right? > > Cheers, > > Rüdiger > > On Wednesday, February 3, 2016 at 11:53:59 AM UTC+1, rkuhn wrote: > The problem with this approach is that it opens up that dispatcher to use > unbounded resources—unless you know that the number of concurrent blocking{} > calls is bounded sensibly in your program. > > Other than that it should work as a band-aid. > > An alternative might be to use the akka.actor.deployment section to place the > actors in question on their own “blocking” dispatcher. > > Regards, > > Roland > >> 3 feb 2016 kl. 11:42 skrev rklaehn <[email protected] <javascript:>>: >> >> Hi all, >> >> quick question: when I do a blocking call from inside an akka actor, should >> I wrap it with scala.concurrent.blocking { ... } ? >> >> Cheers, >> >> Rüdiger >> >> p.s. I am well aware that this is something you should avoid if at all >> possible, and do on a dedicated dispatcher if you can't avoid this. But >> sometimes you have an existing code base that does not follow best >> practices, and you have to quickly improve things and don't have time for a >> major redesign. >> >> >> -- >> >>>>>>>>>> Read the docs: http://akka.io/docs/ <http://akka.io/docs/> >> >>>>>>>>>> Check the FAQ: >> >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >> >>>>>>>>>> <http://doc.akka.io/docs/akka/current/additional/faq.html> >> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user >> >>>>>>>>>> <https://groups.google.com/group/akka-user> >> --- >> You received this message because you are subscribed to the Google Groups >> "Akka User List" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] <javascript:>. >> Visit this group at https://groups.google.com/group/akka-user >> <https://groups.google.com/group/akka-user>. >> For more options, visit https://groups.google.com/d/optout >> <https://groups.google.com/d/optout>. > > > > Dr. Roland Kuhn > Akka Tech Lead > Typesafe <http://typesafe.com/> – Reactive apps on the JVM. > twitter: @rolandkuhn > <http://twitter.com/#!/rolandkuhn> > > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ <http://akka.io/docs/> > >>>>>>>>>> Check the FAQ: > >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html > >>>>>>>>>> <http://doc.akka.io/docs/akka/current/additional/faq.html> > >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user > >>>>>>>>>> <https://groups.google.com/group/akka-user> > --- > You received this message because you are subscribed to the Google Groups > "Akka User List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at https://groups.google.com/group/akka-user > <https://groups.google.com/group/akka-user>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. Dr. Roland Kuhn Akka Tech Lead Typesafe <http://typesafe.com/> – Reactive apps on the JVM. twitter: @rolandkuhn <http://twitter.com/#!/rolandkuhn> -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
