actors style of concurrent programming

from <<Programming in scala>>

  • Actors should not block
  • Communicate with actors only via messages
  • Prefer immutable messages
  • Make messages self-contained


引用

A balanced attitude for Scala programmers

Prefer vals, immutable objects, and methods without side effects.
Reach for them first. Use vars, mutable objects, and methods with side
effects when you have a specific need and justification for them.

你可能感兴趣的:(scala)