The difference between Agent and Actor

  • An agent has a value that can be retrieved directly with deref,However an Actor encapsulates state but provides no direct means to access it.
  • An Actor encapsulates behavior; an agent does not(the function that implements an action is provided by the sender)
  • Actors provide sophisticated support for error detection and recovery, Agents' error reporting is much more primitive.
  • Actors can be remote; Angents provide no support for distribution
  • Composing actors can deadlock; composing agents cannot.
原文地址:https://www.cnblogs.com/ydlme/p/4372049.html