Common Design Patterns for Symbian OS: The Foundations of Smartphone Software
by Adrian A. I. Issott
5.1. Active Objects
Intent
Enable efficient multitasking within a single thread by using the Symbian OS active object framework.
AKA
None known
5.1.1. Problem
5.1.1.1. Context
Your application or service needs to continue executing other tasks while waiting for the completion of an asynchronous service.
5.1.1.2. Summary
You wish to reduce your maintenance costs, such as by reducing the time that you spend debugging your software.
You wish to reduce the time that you need to spend testing your software looking for defects.
You wish to reduce the amount of RAM used by your software, for example by reducing the number of threads running in your process.
5.1.1.3. Description
There are many kinds of services that are naturally asynchronous and which therefore expose asynchronous APIs to clients. In general, asynchronous APIs are likely to be found wherever you have an interface to a component that is unpredictable or irregular; has a potentially high response time;[] or which in any sense displays indeterministic behavior. A good strategy is to treat virtually any event signal coming from outside the current process in an asynchronous manner so that you are less dependent on components outside of your control. Examples of this range from end users generating input of any kind to communication lines that can go down and phones that could get left off the hook.
[] Known as latency.
Any program that deals with event generators, invokes callbacks or shares a resource through Client–Server ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access