mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-10 13:04:23 -04:00
Optimization in event_process_active(): ignore maxcb & endtime for highest priority events.
This commit is contained in:
parent
9fa56bdf1c
commit
a9866aa8c1
8
event.c
8
event.c
@ -1439,8 +1439,12 @@ event_process_active(struct event_base *base)
|
|||||||
for (i = 0; i < base->nactivequeues; ++i) {
|
for (i = 0; i < base->nactivequeues; ++i) {
|
||||||
if (TAILQ_FIRST(&base->activequeues[i]) != NULL) {
|
if (TAILQ_FIRST(&base->activequeues[i]) != NULL) {
|
||||||
activeq = &base->activequeues[i];
|
activeq = &base->activequeues[i];
|
||||||
c = event_process_active_single_queue(base, activeq,
|
if (i == 0)
|
||||||
maxcb, endtime);
|
c = event_process_active_single_queue(base, activeq,
|
||||||
|
INT_MAX, NULL);
|
||||||
|
else
|
||||||
|
c = event_process_active_single_queue(base, activeq,
|
||||||
|
maxcb, endtime);
|
||||||
if (c < 0)
|
if (c < 0)
|
||||||
return -1;
|
return -1;
|
||||||
else if (c > 0)
|
else if (c > 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user