“I bought this guide a few days ago to prepare for my interview with Oracle. Many of the questions they asked me were from this guide. I found this book absolutely great!”
We need Active Objects to perform multi-tasking in a single thread. It is also needed when you deal with client-server architecture inside Symbian. RunL() needs to be kept short as it is an non-preemptive multi-tasking process, it would hang the system otherwise.
Active Objects are a way in Symbian to implement Asynchronous processing. This is also called co-operative multitasking as the requests placed by AO are non-preemptive. This approach of AO is preferred in Symbian over multithreading due to lesser overhead involved in context switching between AOs than the overhead involved in the context switching of Threads. But situations where Real Time response is required, Multithreading is the better option than AOs because the RunL() of an AO cannot be preempted untill it has finished its task, which can make AO unfit for real time operations. To implement AO(Active Objects) you need to derive your class from CActive and implement its two pure virtual functions RunL() and DoCancel().
We need Active Objects to perform multi-tasking in a single thread. It is also needed when you deal with client-server architecture inside Symbian. RunL() needs to be kept short as it is an non-preemptive multi-tasking process, it would hang the system otherwise.
Active Objects are a way in Symbian to implement Asynchronous processing. This is also called co-operative multitasking as the requests placed by AO are non-preemptive. This approach of AO is preferred in Symbian over multithreading due to lesser overhead involved in context switching between AOs than the overhead involved in the context switching of Threads. But situations where Real Time response is required, Multithreading is the better option than AOs because the RunL() of an AO cannot be preempted untill it has finished its task, which can make AO unfit for real time operations. To implement AO(Active Objects) you need to derive your class from CActive and implement its two pure virtual functions RunL() and DoCancel().
Leave an Answer/Comment