]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Move event cache updates into event processing thread.
authorRussell Bryant <russell@russellbryant.com>
Tue, 31 Jul 2012 20:33:57 +0000 (20:33 +0000)
committerRussell Bryant <russell@russellbryant.com>
Tue, 31 Jul 2012 20:33:57 +0000 (20:33 +0000)
commit733b46022bae0385e9fb33e29c16eee67a5a5110
tree4d09421d8c5a36300a18a0f88afbf201413ded33
parent9b16c8b0f6c3b6310e303411421bfcb16b26c3c4
Move event cache updates into event processing thread.

Prior to this patch, updating the device state cache was done by the thread
that originated the event.  It would update the cache and then queue the event
up for another thread to dispatch.  This thread moves the cache updating part
to be in the same thread as event dispatching.

I was working with someone on a heavily loaded Asterisk system and while
reviewing backtraces of the system while it was having problems, I noticed that
there were a lot of threads contending for the lock on the event cache.  By
simply moving this into a single thread, this helped performance *a lot* and
alleviated some deadlock-like symptoms.

Review: https://reviewboard.asterisk.org/r/2066/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/event.c