[Freeswitch-dev] Priority design in the event engine
Michael Jerris
mike at jerris.com
Tue Sep 19 08:08:15 EDT 2006
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 at gmail.com]
Sent: Tuesday, September 19, 2006 7:47 AM
To: freeswitch-dev at 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 at camangi.com> wrote: There are three priority
levels in the event system - "NORMAL","HIGH" and "LOW".
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 at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20060919/68e36b01/attachment-0001.html
More information about the Freeswitch-dev
mailing list