class CActiveSchedulerWait : public CBase |
Controls a single scheduling loop in the current active scheduler.
This class provides better control of nested wait loops in the active scheduler.
Note that a CActiveSchedulerWait object can be used as a data member inside other CBase derived classes.
Public Member Functions | |
---|---|
CActiveSchedulerWait() | |
~CActiveSchedulerWait() | |
IMPORT_C void | AsyncStop() |
IMPORT_C void | AsyncStop(const TCallBack &) |
IMPORT_C TBool | CanStopNow() |
TBool | IsStarted() |
IMPORT_C void | Start() |
Private Attributes | |
---|---|
CActiveScheduler::TLoopOwner | iLoop |
IMPORT_C | ~CActiveSchedulerWait | ( | ) |
Ensures that the attached scheduler loop, and all nested loops, are stopped prior to destruction.
IMPORT_C void | AsyncStop | ( | ) |
Stops the scheduling loop owned by this object.
Note that the corresponding call to Start() only returns once all nested scheduler loops have stopped.
IMPORT_C void | AsyncStop | ( | const TCallBack & | aCallMeWhenStopped | ) |
Stops the scheduling loop owned by this object, specifying a callback.
This version of AsyncStop() provides a callback which is invoked immediately after the scheduler loop actually stops before the corresponding call to Start() returns.
Note that the corresponding call to Start() only returns once all nested scheduler loops have stopped.
const TCallBack & aCallMeWhenStopped | The callback to invoke when the scheduler loop exits. |
IMPORT_C TBool | CanStopNow | ( | ) | const |
Reports whether stopping will have immediate effect.
This returns an indication of whether a call to AsyncStop() would be expected to stop the scheduler loop immediately, or whether it will have to wait until nested scheduler loops have stopped. This may alter which version of AsyncStop() you would want to call.
TBool | IsStarted | ( | ) | const [inline] |
Reports whether this CActiveSchedulerWait object is currently started.
Note: a CActiveSchedulerWait object itself becomes "stopped" as soon as AsyncStop() is called, and can be started again immediately if required (but this would start a new nested level of the scheduler).
IMPORT_C void | Start | ( | ) |
Starts a new wait loop under the control of the current active scheduler.
Compared with CActiveScheduler::Start(), this object owns control of the scheduling loop that is started, and that loop can only be stopped by using this objects AsyncStop() function or the CActiveScheduler::Halt() function. Start() only returns when either of thos has occurred.
This is the preferred way to start a nested wait loop. Typically, a nested wait loop is used when the handling of a completed event in an active object requires processing further events from the other active objects before it can complete. This is a form of modal processing.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.