mirror of https://github.com/sipwise/sems.git
Classes that inherit from both AmThread and AmEventHandler must inherit from AmEventQueue first and from AmThread after. This is needed so that the AmThread dtor is called first, which will trigger the thread to shut down, which in turn makes sure nothing is waiting on the AmEventQueue's condition variable. Otherwise, if AmEventQueue is destroyed first while the corresponding thread is still running and waiting on the condition variable, it will be a deadlock. With this, sems finally can shut down cleanly without having to be killed by systemd. Change-Id: I914455763b517c96561acb0b64fce26f127f44bcmr13.3.1
parent
06edeb7ce0
commit
8d0c121afc
Loading…
Reference in new issue