Symbian
Symbian OS Library

FAQ-0740 I set my Active Object priority to EPriorityLow but it seems to run at EPriorityHigh

[Index][spacer] [Previous] [Next]



 

Classification: C++ Category: Active Objects
Created: 09/19/2001 Modified: 09/19/2001
Number: FAQ-0740
Platform: ER5, Symbian OS v6.0, Symbian OS v6.1

Question:
I set my Active Object priority to EPriorityLow but it seems to run at EPriorityHigh

Answer:
Be very careful when you create an active object with priority EPriorityLow or EPriorityHigh. These constants have two different definitions depending on whether you are in the scope of CActive or not.
E32STD.H defines EPriorityLow as 150 and EPriorityHigh as 450.

CActive defines EPriorityLow as -20 and EPriorityHigh as 20.

So if you are outside CActive scope, make sure you use the CActive:: scope qualifier for active object priorities. If you don't your active object will be higher priority than you might expect.