2
• class Consumer {
public:
  void Process( Message msg ) { DoSomethingWith( msg ); }
};
• active Consumer consumer;
• active class Producer {
  void main() {
    for( int i = 0; ++i < 100; ) {
      Message msg = DoSomeWork();
      consumer.Process( msg ); // non-blocking call
    }
  }
};
• int main() {
  active Producer p;
} // wait for p to end
• // wait for consumer to end
•Impact vs. nonconcurrent: Add active.
Example: Producer-Consumer