Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
260 ASYNCHRONOUS FUNCTIONS AND ACTIVE OBJECTS 8.5 Active Object Priorities When an active object is constructed, a priority value is passed to CActive's constructor. The possible priority values (lowest to high- est) are: EPriorityIdle, EPriorityLow, EPriorityStandard, EPriorityUserInput, EPriorityHigh. The priority value is nor- mally specified in your derived active object's constructor as follows: CDerivedActiveObject::CDerivedActiveObject() : CActive(CActive::EPriorityStandard) { } If multiple active objects have outstanding asynchronous functions in progress, and two or more of these functions complete at the same time, then the scheduler will see multiple active objects with iActive set to ETrue and iStatus not equal to KRequestPending upon the next semaphore event. In this case, the RunL() for the higher-priority active object is invoked. The scheduler then checks the request semaphore, sees the next event, and executes the RunL() of the next-highest priority active object that is still active, and so on.