Symbian3/PDK/Source/GUID-2B8D3611-5B97-50E7-A9DD-23626A8EFB45.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Tue, 30 Mar 2010 11:56:28 +0100
changeset 5 f345bda72bc4
parent 3 46218c8b8afa
child 14 578be2adaf3e
permissions -rw-r--r--
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-2B8D3611-5B97-50E7-A9DD-23626A8EFB45" xml:lang="en"><title>Introduction
to active objects and the active scheduler</title><shortdesc>This document provides a short introduction to active objects and
active schedulers.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<section id="GUID-A139EAE2-5471-496C-B584-DE10D7415CD3"><title>Active objects</title> <p>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. </p> <p>Some asynchronous
service providers supply active object based classes as interfaces through
which clients access them. </p> <p>An active object is an instance of a <codeph>CActive</codeph> derived
class. </p> </section>
<section id="GUID-73A2BF4F-AE0A-4357-AE75-EA5AA678109F"><title>The active scheduler</title> <p>An active scheduler encapsulates
the wait loop which is at the heart of all programs using multiple asynchronous
services. </p> <p>An active scheduler is an instance of a <codeph>CActiveScheduler</codeph> class
or, in some circumstances, an instance of a <codeph>CActiveScheduler</codeph> <i>derived</i> class. </p> <p>Active
objects, together with the active scheduler, provide a system of non pre-emptive
multi-tasking which runs on a single thread. </p> <p>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. </p> <p><b>See
also</b> </p> <p> <xref href="GUID-C0C19F93-D804-5AED-90E4-A814FA6A3732.dita">Low
Level Asynchronous Service Handling</xref> </p> </section>
</conbody></concept>