Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
CActiveSchedulerWait Class Reference

Controls a single scheduling loop in the current active scheduler. More...

#include <e32base.h>

Inheritance diagram for CActiveSchedulerWait:
CBase

Public Member Functions

IMPORT_C CActiveSchedulerWait ()
 Default constructor.
 
IMPORT_C ~CActiveSchedulerWait ()
 Ensures that the attached scheduler loop, and all nested loops, are stopped prior to destruction.
 
IMPORT_C void Start ()
 Starts a new wait loop under the control of the current active scheduler.
 
IMPORT_C void AsyncStop ()
 Stops the scheduling loop owned by this object.
 
IMPORT_C void AsyncStop (const TCallBack &aCallMeWhenStopped)
 Stops the scheduling loop owned by this object, specifying a callback.
 
TBool IsStarted () const
 Reports whether this CActiveSchedulerWait object is currently started.
 
IMPORT_C TBool CanStopNow () const
 Reports whether stopping will have immediate effect.
 
- Public Member Functions inherited from CBase
 CBase ()
 Default constructor.
 
virtual IMPORT_C ~CBase ()
 Virtual destructor.
 
TAny * operator new (TUint aSize, TAny *aBase) __NO_THROW
 Initialises the object to binary zeroes.
 
TAny * operator new (TUint aSize) __NO_THROW
 Allocates the object from the heap and then initialises its contents to binary zeroes.
 
TAny * operator new (TUint aSize, TLeave)
 Allocates the object from the heap and then initialises its contents to binary zeroes.
 
TAny * operator new (TUint aSize, TUint aExtraSize) __NO_THROW
 Allocates the object from the heap and then initialises its contents to binary zeroes.
 
TAny * operator new (TUint aSize, TLeave, TUint aExtraSize)
 Allocates the object from the heap and then initialises its contents to binary zeroes.
 

Additional Inherited Members

- Static Public Member Functions inherited from CBase
static IMPORT_C void Delete (CBase *aPtr)
 Deletes the specified object.
 
- Protected Member Functions inherited from CBase
virtual IMPORT_C TInt Extension_ (TUint aExtensionId, TAny *&a0, TAny *a1)
 Extension function.
 

Detailed Description

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.

See also
CActiveScheduler
API status
Published to all clients. Released API.

Definition at line 2970 of file e32base.h.

Constructor & Destructor Documentation

◆ CActiveSchedulerWait()

IMPORT_C CActiveSchedulerWait::CActiveSchedulerWait ( )

Default constructor.

(generated from Symbian Developer Library)

◆ ~CActiveSchedulerWait()

IMPORT_C CActiveSchedulerWait::~CActiveSchedulerWait ( )

Ensures that the attached scheduler loop, and all nested loops, are stopped prior to destruction.

AsyncStop()

(generated from Symbian Developer Library)

Member Function Documentation

◆ AsyncStop() [1/2]

IMPORT_C void CActiveSchedulerWait::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.

Panic condition: E32USER-CBase 92 if the wait object has not been started.

(generated from Symbian Developer Library)

◆ AsyncStop() [2/2]

IMPORT_C void CActiveSchedulerWait::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.

Parameters
aCallMeWhenStoppedThe callback to invoke when the scheduler loop exits.

Panic condition: E32USER-CBase 92 if the wait object has not been started.

(generated from Symbian Developer Library)

◆ CanStopNow()

IMPORT_C TBool CActiveSchedulerWait::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.

Panic condition: E32USER-CBase 92 if the wait object has not been started.

(generated from Symbian Developer Library)

◆ IsStarted()

TBool CActiveSchedulerWait::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).

CActiveSchedulerWait::Start CActiveSchedulerWait::AsyncStop

(generated from Symbian Developer Library)

◆ Start()

IMPORT_C void CActiveSchedulerWait::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.

Panic condition: E32USER-CBase 44 if the thread does not have an active scheduler installed.

Panic condition: E32USER-CBase 91 if this object has already been started.

(generated from Symbian Developer Library)


The documentation for this class was generated from the following files: