Symbian3/SDK/Source/GUID-2B8D3611-5B97-50E7-A9DD-23626A8EFB45.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Thu, 21 Jan 2010 18:18:20 +0000
changeset 0 89d6a7a84779
permissions -rw-r--r--
Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385

<?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>