title: Concurrency TS: std::future<...>::then, how to keep the chain alive without storing the returned future?
body: <p>I am building a set of futures that work in a GUI thread during event dispatching and want to adopt the API of std::future but have hit an issue with chaining futures (non-blocking asynchronous execution).</p>
  
  <p>Say we have a function that returns a future, and we want to execute something once the future is ready</p>
  
  <pre><code>disconnect().then([](std::future&lt;State&gt; &amp;&amp;f) {
     ...
  });
  </code></pre>
  
  <p>It is my understanding that when doing nothing with the returned future from "then", it will be destroyed and the future will be aborted and the function will not anymore be executed. Therefore to make sure the chain is still present and executed properly, we would have to save the future somewhere (perhaps as a data member).</p>
  
  <p>What should we do if we aren't interested in the returned future, but only in the chain of operations and that the function is execute properly? Should we move the returned future into a <code>new std::future&lt;R&gt;(...)</code> and delete it in the lambda after it finished, such as "delete &f;" ? That looks wrong, though.</p>