2
Active Objects and Messages
Nutshell summary:
•active means parallel, wait means blocking:
Gaining/losing concurrency is explicit, as is reentrancy.
•Each active object conceptually runs on its own thread.
•Method calls from other threads are async messages processed serially Þ atomic w.r.t. each other, so no need to lock the object internally or externally. Default mainline is a prioritized FIFO pump.
•Return values and out parameters are futures (future<T>).
•Express thread/task lifetimes as object lifetimes:
Exploit existing rich language semantics.
• active class C {
public:
  void f() { … }
};
• // in calling code, using a C object
active C c;
c.f(); // call is nonblocking
• … // this code can execute in parallel with c.f()
•