On Mon, Apr 30, 2012 at 6:45 PM, Ralph Castain <r...@open-mpi.org> wrote:
 [...]
> I'll take a look at your branch, but had some further thoughts in the 
> interim. Would a more optimal option be to add the following logic to 
> event_priority_set:
>
> event_priority_set(ev, pri) {
>    IF <I am in an event> AND
>        IF <ev->base> EQ <current-base> AND
>        IF <pri> LT <current-pri>  THEN
>            <rescan queues on next loop>
>
> In other words, only rescan and start the dispatch phase if the priority of 
> the new event is higher (less-than) that of the current event. If not, then 
> just proceed as we currently do. This avoid unnecessarily restarting the 
> dispatch phase when lower priority events are defined.
>

That doesn't really make sense; event_priority_set is used to set up
the event, not to add it to the active queue.  You'd want logic like
this in event_active(), not event_priority_set.

(This is, btw, more or less the logic in my branch.)

-- 
Nick
***********************************************************************
To unsubscribe, send an e-mail to majord...@freehaven.net with
unsubscribe libevent-users    in the body.

Reply via email to