Chapter 15. Active Objects

Threads need to cooperate with one another. Various illustrations of thread cooperation were given in previous chapters, including cooperation using condition variables, semaphores, and message queues.

The Active Object pattern has been specifically designed to provide an object-based solution to cooperative processing between threads. The pattern is based on the requirement that two Active Objects should communicate through what look like regular method calls, but these methods will be executed in the context of the receiver, not that of the invoker; hence the name Active Object. In other words, every object that is active has a private thread of control that is used to execute any methods that a client invokes on ...

Get ACE Programmer's Guide, The: Practical Design Patterns for Network and Systems Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.