[Freeswitch-dev] event dispatch thread should exit when idle
Dear Friends, 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. thnx
once the thread is up its asleep anyway, it would be possible to make it go away but its not really hurting anything and if the same situation is likely to continue to happen its more efficient to be ready for it the subsequent times the load occurs. On Thu, Nov 17, 2011 at 6:54 AM, john <john.gubba@rediffmail.com> wrote:
Dear Friends,
I was going through the code of event mechanism in freeswitch. In switch_event.c The 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.
thnx
<http://sigads.rediff.com/RealMedia/ads/click_nx.ads/www.rediffmail.com/signatureline.htm@Middle?> Follow *Rediff Deal ho jaye!<http://track.rediff.com/click?url=___http://dealhojaye.rediff.com?sc_cid=rediffmailsignature___&cmp=signature&lnk=rediffmailsignature&newservice=deals> * to get exciting offers in your city everyday. _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
participants (2)
-
Anthony Minessale
-
john