[haiku-development] Re: Timers in BLoopers

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 11 May 2010 17:51:08 +0200

Ingo Weinhold <ingo_weinhold@xxxxxx> wrote:
> On 2010-05-11 at 16:35:58 [+0200], Stephan Assmus <superstippi@xxxxxx> 
> > wrote:
> [...]
> > What do you guys think, does that sound like a good idea?
> After introducing wait_for_objects() I figured that it would be a 
> useful 
> addition to BLooper to also be able to handle other events than 
> messages 
> (FDs, semaphores, ports, threads, timers). While not that complicated 
> to 
> implement, it would still be a considerable extension of the API. I 
> think 
> it'd be better to wait until after R1.

Why not making the BMessageRunner a bit smarter, and use a local version 
whenever possible? This would not require any API changes, would cause 
less use of global resources, and would make those timers much more 
precise and cheaper as well.

In other words (there is no "an" before "other", stippi, btw :-)), each 
BLooper would get a time based event queue similar to what stippi 
proposed (just with port_count(), instead of the BMessageQueue lock).

Bye,
   Axel.


Other related posts: