This active object implementation is nothing sepecial as most AOs are,
Originally Posted by symbianyucca
maybe I could show you how I called its SetActive(), this may be more helpful.
myThread.Create( myThreadName, SecondaryThreadFunction,... /*the rese paras are omitted*/)
// this is local static function to create active scheduler etc
static TInt SecondaryThreadFunction
// code to create CTrapCleanup is here and omitted...
// code to create, install active scheduler
MyActiveObject* myAO = MyActiveObject::NewL();
// NOTE : pointer to myAO is transferred to main thread by user
CleanupStack::PushL( myAO );
CActiveScheduler::Add( myAO );
// code to delete CTrapCleanup is here and omitted
// in main thread
myAO->Start() // this Start will call SetActive() etc, and after this call that panic is raised for main thread
// and secondary thread is running normally