Symbian
 Developer Library

SYMBIAN OS SDK V8.1A

[Index] [Previous] [Next]



Asynchronous services example codes


SingleRequest: asynchronous programming without active objects

Found in: examples\Base\IPC\Async\SingleRequest


Description

This example shows how to issue and wait for a single request.

The example shows the general principles involved in asynchronous programming. It uses a simple wait loop and shows how the completion of asynchronous events are handled without active objects.

This example deliberately does not use active objects.


Classes used

[Top]


WaitLoop: asynchronous programming without active objects

Found in: examples\Base\IPC\Async\WaitLoop


Description

This example shows how a wait loop can be used to identify and handle a completed request.

It shows the general principles involved in asynchronous programming. It uses a simple wait loop and shows how the completion of asynchronous events are handled without active objects.

This example deliberately does not use active objects.


Classes used

[Top]


RealLifeWaitLoop: asynchronous programming without active objects

Found in: examples\Base\IPC\Async\RealLifeWaitLoop


Description

As with the WaitLoop example, this example shows how a wait loop can be used to identify and handle a completed request. However, this example shows how the wait loop can deal with multiple asynchronous service providers.

The example shows the general principles involved in asynchronous programming; it uses a simple wait loop and shows how the completion of asynchronous events are handled without active objects.

This example deliberately does not use active objects.


Classes used

[Top]


RunComplete: asynchronous programming with active objects

Found in: examples\Base\IPC\Async\RunComplete


Description

The example shows how active objects and an active scheduler can be used to handle asynchronous events. Compare this with the following examples; SingleRequest, WaitLoop and RealLifeWaitLoop.

It demonstrates a single CMessageTimer active object which runs until completion.


Classes used

[Top]


AcceptInput1-2: asynchronous programming with active objects

Found in: examples\Base\IPC\Async\AcceptInputX


Description

These examples show how active objects and an active scheduler can be used to handle asynchronous events.

They demonstrate a single CKeyMessengerProcessor active object (derived from class CActiveConsole), which accepts input from keyboard, but does not print it. This object contains a CMessageTimer object which it activates if the user inputs the character "m" and cancelled if the user inputs "c".


Classes used

[Top]


Fibonacci1-3: asynchronous programming with active objects

Found in: examples\Base\IPC\Async\FibonacciX


Description

These examples show how active objects and an active scheduler can be used to handle asynchronous events and long-running services to maintain system responsiveness.


Classes used