<p>Joshua Colp has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/10584">View Change</a></p><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;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/84/10584/1</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 f1a09f7..25faa46 100644</span><br><span>--- a/include/asterisk/stasis.h</span><br><span>+++ b/include/asterisk/stasis.h</span><br><span>@@ -483,6 +483,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/10584">change 10584</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/10584"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ic5e244da7b16b1895ba1fc5ece481ebba5809c9a </div>
<div style="display:none"> Gerrit-Change-Number: 10584 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@digium.com> </div>