<p>Joshua Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/10586">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  George Joseph: Looks good to me, but someone else must approve
  Kevin Harwell: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved; Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">stasis: Clarify lifetime of topics.<br><br>As mentioned in the comment I've added in the code there is no<br>ability to unsubscribe all subscribers from a topic and explicitly<br>destroy it. This is not currently a problem as we have two types of<br>topics:<br><br>Long lived topics which exist for the lifetime of the system.<br>Ephemeral topics which feed a long lived topic.<br><br>In the case of the ephemeral topics there is no subscriber which does<br>not have its lifetime managed by the same entity that has created<br>the topic. This ensures that when the topic is being unreferenced the<br>subscribers are also unsubscribed and destroyed, allowing the topic<br>to ultimately be destroyed as well.<br><br>Change-Id: Ic5e244da7b16b1895ba1fc5ece481ebba5809c9a<br>---<br>M include/asterisk/stasis.h<br>1 file changed, 5 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/asterisk/stasis.h b/include/asterisk/stasis.h</span><br><span>index 8329dd0..2b56b53 100644</span><br><span>--- a/include/asterisk/stasis.h</span><br><span>+++ b/include/asterisk/stasis.h</span><br><span>@@ -477,6 +477,11 @@</span><br><span>  * \return New topic instance.</span><br><span>  * \return \c NULL on error.</span><br><span>  * \since 12</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \note There is no explicit ability to unsubscribe all subscribers</span><br><span style="color: hsl(120, 100%, 40%);">+ * from a topic and destroy it. As a result the topic can persist until</span><br><span style="color: hsl(120, 100%, 40%);">+ * the last subscriber unsubscribes itself even if there is no</span><br><span style="color: hsl(120, 100%, 40%);">+ * publisher.</span><br><span>  */</span><br><span> struct stasis_topic *stasis_topic_create(const char *name);</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/10586">change 10586</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/10586"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ic5e244da7b16b1895ba1fc5ece481ebba5809c9a </div>
<div style="display:none"> Gerrit-Change-Number: 10586 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 (1000185) </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>