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 =>
}
}
}
. 590-593 Scala : react ( ), . .