[asterisk-commits] dlee: branch dlee/shutdown-deux r389548 - /team/dlee/shutdown-deux/include/as...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu May 23 09:37:59 CDT 2013


Author: dlee
Date: Thu May 23 09:37:56 2013
New Revision: 389548

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=389548
Log:
Added a note about cleanup handlers

Modified:
    team/dlee/shutdown-deux/include/asterisk/stasis.h

Modified: team/dlee/shutdown-deux/include/asterisk/stasis.h
URL: http://svnview.digium.com/svn/asterisk/team/dlee/shutdown-deux/include/asterisk/stasis.h?view=diff&rev=389548&r1=389547&r2=389548
==============================================================================
--- team/dlee/shutdown-deux/include/asterisk/stasis.h (original)
+++ team/dlee/shutdown-deux/include/asterisk/stasis.h Thu May 23 09:37:56 2013
@@ -671,6 +671,15 @@
 /*!
  * \brief Boiler-plate removing macro for cleaning up message types.
  *
+ * Note that if your type is defined in core instead of a loadable module, you
+ * should call message type cleanup from an ast_register_cleanup() handler
+ * instead of an ast_register_atexit() handler.
+ *
+ * The reason is that during an immediate shutdown, loadable modules (which may
+ * refer to core message types) are not unloaded. While the atexit handlers are
+ * run, there's a window of time where a module subscription might reference a
+ * core message type after it's been cleaned up. Which is bad.
+ *
  * \param name Name of message type.
  * \since 12
  */




More information about the asterisk-commits mailing list