diff -r 43e37759235e -r 51a74ef9ed63 Symbian3/SDK/Source/GUID-8EAB97D5-267A-58CC-BC3E-5CB1D72CB7ED.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-8EAB97D5-267A-58CC-BC3E-5CB1D72CB7ED.dita Wed Mar 31 11:11:55 2010 +0100 @@ -0,0 +1,39 @@ + + + + + +Non +pre-emptive servicingThis document describes how requests to active objects are serviced +non pre-emptively. +

The UI server frameworks spend most of their time waiting for some event +to occur, and then spend a short time executing a RunL() function +to service that event. When one event has been serviced, processing returns +to the wait loop in the active scheduler allowing other events to be serviced.

+

If a second request completes while the RunL() function +is handling completion of the first request, then another call to RunL() to +handle completion of the second request cannot be scheduled until the first +invocation of RunL() is complete.

+

This means that active object scheduling is non pre-emptive.

+

Active objects are queued from the active scheduler in order of priority. +The priority is usually determined at the time that the active object is constructed, +although it can be changed later.

+

If several requests complete while a RunL() function is +handling the completion of earlier request, the active scheduler takes the +first active object (i.e. the one with the highest priority) with a completed +request and calls its RunL() function.

+

As scheduling is non pre-emptive, a high-priority request cannot be serviced +until the previously running request’s RunL() has completed.

+
Recommendations for active object priority

Most +active objects should have a priority of TPriority::EPriorityStandard and +processing should not depend on the order in which active objects are scheduled.

However, +any active object involved in user input should have a higher priority over +other active objects to ensure responsiveness and to allow user control over +a device.

Long running and background services should have a low priority.

+
\ No newline at end of file