Can a Scala actor structure handle 10,000 members without stack issues?

I want to do a multi-agent simulation containing about 10,000 agents (machine and product agents) using the Scala Actor structure.

As I understand it, if there are many participants sending messages, can it end due to recursion?

If so, how can I increase stack sizes for underlying workflows?

+5
source share
1 answer

A framework for the actors was designed for this - in fact, it can handle this with only one thread, assuming you use the template loop-reactas follows:

import actors._
import actors.Actor._

val a = actor {
  loop {
    react {
      case ABC => //Handle here

    }
  }
}

. 590-593 Scala : react ( ), . .

+11

All Articles