4.2. Request Completion
Intent
Use TRequestStatus as the basis for event signals sent across thread and process boundaries.
AKA
None known
4.2.1. Problem
4.2.1.1. Context
You wish to propagate warm event signals between an event generator and an event consumer operating within different threads or processes.
4.2.1.2. Summary
You wish to reduce the power usage of your component.
You want to promote encapsulation of and loose coupling between your event generators and event consumers.
4.2.1.3. Description
An event generator wishes to propagate event signals to an event consumer that is running in a separate thread, possibly in a different process. The fact that a thread boundary is being crossed means Event Mixin (see page 93) can't be used to solve the problem.
In addition, the need to support event signals crossing a process boundary means that a number of other possible solutions, such as function pointers, simply won't work. This is because the Symbian OS kernel enforces memory isolation between processes and so an object in one process cannot be directly accessed from another process. In fact, the only way to send event signals between processes is to involve the kernel in some way.
4.2.1.4. Example
The USB Manager component in Symbian OS uses the transient variant of Client–Server (see page 182) to co-ordinate the support for USB. Being a transient server, it is initialized when a client first creates a session to it. When the first session has been created, there is ...
Get Common Design Patterns for Symbian OS: The Foundations of Smartphone Software now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.