Symbian3/SDK/Source/GUID-FE14D954-4712-5DCE-998E-A39D79500ABF.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 0 89d6a7a84779
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.

<?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-FE14D954-4712-5DCE-998E-A39D79500ABF" xml:lang="en"><title>Asynchronous
service providers</title><shortdesc>This document explains the use of asynchronous service providers.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>In a multiprocessing system, user programs wait for events, for example,
keyboard input, pointer input, completion of an I/O request, timer events
etc. These events, and the services associated with them, are provided by <i>asynchronous
service providers</i>.</p>
<p>A program has a main loop that:</p>
<ul>
<li id="GUID-9F0D109A-9562-52C5-9AA7-B6C99FD4E0DA"><p>calls appropriate service
providers</p> </li>
<li id="GUID-5A0790A7-F25C-59C7-868D-AE7DFCF323AB"><p>waits for events</p> </li>
<li id="GUID-17B548C5-5355-55FB-9F3F-2D229EF9F0BE"><p>acts on completed events,
resulting, most likely, in further calls to service providers.</p> </li>
</ul>
<p>All Symbian platform programs make extensive use of asynchronous services.
For this reason, Symbian platform provides mechanisms which make them easy
to use. </p>
<p>Low-level asynchronous service handling encompasses:</p>
<ul>
<li id="GUID-AC93B268-406A-5558-BCA1-AE1EB2448D51"><p>the asynchronous service
provider, which provides asynchronous services using request functions and
cancel functions.</p> </li>
<li id="GUID-CC29D95F-0EE4-5F4C-918A-17AEF2EC6783"><p>the asynchronous <i>request
status</i> which indicates the completion status of a request.</p> </li>
<li id="GUID-ED692928-B973-59B2-A494-ABD8392CE603"><p>the <i>thread request
semaphore</i>, the means by which a service provider signals to a requester
that it has completed a request.</p> </li>
</ul>
<p>High-level asynchronous service handling encompasses</p>
<ul>
<li id="GUID-C8ECE905-78DC-5F32-9386-D2948C71CD79"><p>the <keyword>active
scheduler</keyword>, which encapsulates the wait loop which is at the heart
of all programs using multiple asynchronous services.</p> </li>
<li id="GUID-552B8268-9CDA-5D8C-BA61-B6715F83E777"><p><keyword>active objects</keyword>,
which encapsulate an asynchronous service provider, its request and cancel
functions, and the function which handles completion of requests.</p> </li>
</ul>
</conbody></concept>