This document provides a short introduction to active objects and active schedulers.
An active object is a convenient encapsulation of the behaviour involved in making requests to an asynchronous service provider and handling the completion of those requests. Specifically, it encapsulates the service provider's request, cancel functions and the function which handles the completion of those requests.
Some asynchronous service providers supply active object based classes as interfaces through which clients access them.
An active object is an instance of a CActive derived class.
An active scheduler encapsulates the wait loop which is at the heart of all programs using multiple asynchronous services.
An active scheduler is an instance of a CActiveScheduler class or, in some circumstances, an instance of a CActiveScheduler derived class.
Active objects, together with the active scheduler, provide a system of non pre-emptive multi-tasking which runs on a single thread.
In Symbian platform, it is easier to write a system of co-operating active objects than a system of co-operating threads. The run-time cost of an active object is significantly less than that of a thread. Creating and destroying active objects is more efficient than creating and destroying threads.
See also
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.