<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.newlc.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>NewLC - Can active object RunL method be interrupted, when the active object is listening a USB event? - Comments</title>
 <link>http://www.newlc.com/forum/can-active-object-runl-method-be-interrupted-when-active-object-listening-usb-event</link>
 <description>Comments for &quot;Can active object RunL method be interrupted, when the active object is listening a USB event?&quot;</description>
 <language>en</language>
<item>
 <title>Re: Can active object RunL method be interrupted, when the activ</title>
 <link>http://www.newlc.com/forum/can-active-object-runl-method-be-interrupted-when-active-object-listening-usb-event#comment-43515</link>
 <description>&lt;p&gt;active objects don&#039;t work as you seem to think.&lt;br /&gt;
non of your active objects code is running while it is waiting for the event.&lt;br /&gt;
In case of no events incomeing, your thread will sleep and do nothing, within the active scheduler loop. (a call to RSemaphore::Wait())&lt;br /&gt;
when an event occours, your thread is _not_ run immediatly, the only thing that happens is that RSemaphore::Signal() is called, wich causes a counter to increased, and your thread will be scheduled to run.&lt;br /&gt;
When the thread then runs (which could take some time if other high priority threads is hogging the CPU), the AS will then start process the event by finding the active object that has its iStatus set to ERequestComplete and call that AO:s RunL function.&lt;br /&gt;
If another event occours while the RunL is processing, all that happens is that the request counter is increased one more step, so the Active Scheduler loop will loop once more, processing also this event, before putting the thread to sleep again.&lt;br /&gt;
&lt;/p&gt;</description>
 <pubDate>Fri, 14 Dec 2007 14:01:06 +0100</pubDate>
 <dc:creator>alh</dc:creator>
 <guid isPermaLink="false">comment 43515 at http://www.newlc.com</guid>
</item>
<item>
 <title>Thank you very much,
It is</title>
 <link>http://www.newlc.com/forum/can-active-object-runl-method-be-interrupted-when-active-object-listening-usb-event#comment-43493</link>
 <description>&lt;p&gt;Thank you very much,&lt;br /&gt;
It is right that RunL is non-preemted, I found the error about my code. The RunL leaves.&lt;/p&gt;

&lt;p&gt;If my CActive object listen the hardware event, when the RunL is running, can the hardware event enter? If not, what about missing the event; if so the RunL atomic is crashed.&lt;br /&gt;
&lt;/p&gt;</description>
 <pubDate>Fri, 14 Dec 2007 02:25:10 +0100</pubDate>
 <dc:creator>runforu</dc:creator>
 <guid isPermaLink="false">comment 43493 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Can active object RunL method be interrupted, when the activ</title>
 <link>http://www.newlc.com/forum/can-active-object-runl-method-be-interrupted-when-active-object-listening-usb-event#comment-43474</link>
 <description>&lt;p&gt;Difficult to say what is happening without seeing more of your code. In most situation, the RunL cannot be interrupted . At least This is the case in a single threaded context. So another function executing in the same thread cannot preempt the execution, provided that you don&#039;t play with a second Active Scheduler or WaitForRequest within the RunL).&lt;br /&gt;
&lt;/p&gt;</description>
 <pubDate>Thu, 13 Dec 2007 10:15:53 +0100</pubDate>
 <dc:creator>eric</dc:creator>
 <guid isPermaLink="false">comment 43474 at http://www.newlc.com</guid>
</item>
<item>
 <title>Can active object RunL method be interrupted, when the active object is listening a USB event?</title>
 <link>http://www.newlc.com/forum/can-active-object-runl-method-be-interrupted-when-active-object-listening-usb-event</link>
 <description>&lt;p&gt;Hi,&lt;br /&gt;
  My active object  has a method to listening the USB event. Can the RunL method be interrupted when the USB event&lt;br /&gt;
is comming. In my code trace, It looks that the RunL is interrupted, and then the RunL is never resumed.&lt;br /&gt;
  Do you have ideas about the problem.&lt;/p&gt;

&lt;p&gt;The AO looks like:&lt;br /&gt;
class MyAO: public CActive&lt;br /&gt;
{&lt;br /&gt;
public: &lt;br /&gt;
    RunL();&lt;br /&gt;
    HandleUSBEvent();&lt;br /&gt;
}&lt;br /&gt;
 &lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.newlc.com/forum/can-active-object-runl-method-be-interrupted-when-active-object-listening-usb-event&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.newlc.com/forum/can-active-object-runl-method-be-interrupted-when-active-object-listening-usb-event#comments</comments>
 <category domain="http://www.newlc.com/forums/symbian-c">Symbian C++</category>
 <pubDate>Thu, 13 Dec 2007 09:00:50 +0100</pubDate>
 <dc:creator>runforu</dc:creator>
 <guid isPermaLink="false">19797 at http://www.newlc.com</guid>
</item>
</channel>
</rss>
