[Freeswitch-dev] event dispatch thread should exit when idle
john.gubba at rediffmail.com
Thu Nov 17 15:54:50 MSK 2011
I was going through the code of event mechanism in freeswitch. In switch_event.cThe switch event thread may spawn more dispatch threads in case heavy load.But I am wandering why there isn't any exit mechanism of the event dispatch thread.
event dispatch thread only exits when shutdown.
Current event dispatch queue size is 10,000. At some point of time event thread detects 12,000 events to be dispatched. It spawns a new dispatch thread - 2, to deliver remaining 2000 events. but after that dispatch thread -2 remains active & idle.
I think we need to kill this idle thread+queue, so that it can be re spawned latter on. and max no of dispatch threads never get exceed.
Please reply me if anyone has implemented this or have any idea abt this.
-------------- next part --------------
An HTML attachment was scrubbed...
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-dev