[haiku-development] Re: Timers in BLoopers

  • From: Stephan Assmus <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 12 May 2010 15:21:33 +0200

Hi,

On 2010-05-12 at 14:01:38 [+0200], Ingo Weinhold <ingo_weinhold@xxxxxx> wrote:
> On 2010-05-12 at 13:47:32 [+0200], Stephan Assmus <superstippi@xxxxxx> 
> wrote:
> > I am not so sure. Who would send the messages locally? Wouldn't that also
> > be another thread?
> 
> Nope.
> 
> > I find it much more elegant (because cheaper and even
> > more precise) to read from the port with a timeout and process timers when
> > it timed out.
> 
> That's pretty much what Axel suggested. There wouldn't be any additional 
> API.
> When port_count_etc() times out (well, the timers probably need to be
> considered in the delivery loop, too) the task looper thread would simply
> create and deliver the message runner's message immediately.

Ah ok, so we are completely on the same page here. I didn't think what Axel 
suggested was only about avoiding another API. Perfect, then. :-)

Best regards,
-Stephan

Other related posts: