Switch_event.c:236-248
for(i = 0; i < 3; i++) {
if (len[i]) {
queue
= queues[i];
while(queue) {
if
(switch_queue_trypop(queue, &pop) == SWITCH_STATUS_SUCCESS) {
out_event
= pop;
switch_event_deliver(&out_event);
}
else {
break;
}
}
}
}
This cycles through the queue’s from
high priority to low priority, fully exhausting each queue as it goes, so it
delivers all the high priority events before it starts with the normal events.
It does not go back and deliver a high priority event if one comes in after it
has been emptied the first time.
Mike
From: Ivo Vachkov
[mailto:ivo.vachkov@gmail.com]
Sent: Tuesday, September 19, 2006
7:47 AM
To:
freeswitch-dev@lists.freeswitch.org
Subject: Re: [Freeswitch-dev]
Priority design in the event engine
Probably it was just an
idea at the time of writing that code and left unfilled. ... just a guess ...
:) Otherwise it could be implemented with serveral queues and rules to service
the queues in a given order.
On 9/19/06, will
<will@camangi.com> wrote:
There
are three priority levels in the event system – "
When
I trace into "switch_event.c", a "for loop" can be found
there. But it seems no
effect
on priority. I mean, it just pop and deliver events by turns.
What's
the meaning of priority in FreeSwitch?
Will
_______________________________________________
Freeswitch-dev mailing list
Freeswitch-dev@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
--
"UNIX is basically a simple operating system, but you have to be a genius
to understand the simplicity." Dennis Ritchie