[Customdrawn] Some patches

Giuliano Colla giuliano.colla at fastwebnet.it
Sat Mar 31 00:04:24 CEST 2012


Il 30/03/2012 08:58, Felipe Monteiro de Carvalho ha scritto:
> Ok, everything great =) But on the timer I have some comments:
>
> On Fri, Mar 30, 2012 at 1:50 AM, Giuliano Colla
> <giuliano.colla at fastwebnet.it>  wrote:
>> 6) I inserted a different mechanism to handle timers...
> Ok, I will apply the new timer but not make it default, because I
> think that the use case of lots of messages going around it a
> critically important use case, much more then precision when there are
> few events. The new timer would negatively affect LazClock heavily for
> example.
>
Maybe you've had no time to look at it in detail. Actually there's 
absolutely no difference in the amount of messages going around, with 
respect with the old timer.
There are just two differences:

1) You don't need to scan all the list to know which one is the first 
timer which will expire, because it's always at the head of the list.
The list is scanned only when either a timer expires, or when a new 
timer in inserted, and then not completely, but only to the point where 
the timer must be inserted.

2) Each timer doesn't carry only the interval information, but also at 
which moment it is expected to fire, which can make it much more exact, 
provided the main thread isn't busy doing something else.





More information about the Customdrawn mailing list