Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


Introduction to active objects and the active scheduler

[Top]


Active objects

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.

[Top]


The active scheduler

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 OS, 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

Low Level Asynchronous Service Handling