[Asterisk-code-review] sched.c: Ensure oldest expiring entry runs first. (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Tue Mar 15 10:03:10 CDT 2016


Richard Mudgett has posted comments on this change.

Change subject: sched.c: Ensure oldest expiring entry runs first.
......................................................................


Patch Set 1:

(2 comments)

https://gerrit.asterisk.org/#/c/2390/1/main/sched.c
File main/sched.c:

Line 469: 		con->highwater = size + 1;
> Why the logic change to size + 1?
Before the highwater was updated AFTER it was pushed into the heap so size included the new event.  Now it is updated BEFORE it is pushed into the heap so size is one less than it was before the patch.


Line 472: 	/* Determine the tie breaker value for the new entry. */
> Why not just record the 'current time' in the entry and compare that if the
The current time only has so much granularity and that granularity is system dependent.  The tie_breaker is guaranteed to be different for each event pushed into the heap.


-- 
To view, visit https://gerrit.asterisk.org/2390
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib69437327b3cda5e14c4238d9ff91b2531b34ef3
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list